2005-10-25 06:05:58 +00:00
|
|
|
#ifndef __BARRIER_H
|
|
|
|
#define __BARRIER_H
|
|
|
|
|
2005-10-30 01:15:43 +00:00
|
|
|
#include <asm/compiler.h>
|
|
|
|
|
2013-11-06 13:57:36 +00:00
|
|
|
#define mb() __asm__ __volatile__("mb": : :"memory")
|
|
|
|
#define rmb() __asm__ __volatile__("mb": : :"memory")
|
|
|
|
#define wmb() __asm__ __volatile__("wmb": : :"memory")
|
2005-10-25 06:05:58 +00:00
|
|
|
|
2013-11-06 13:57:36 +00:00
|
|
|
#define read_barrier_depends() __asm__ __volatile__("mb": : :"memory")
|
2005-10-25 06:05:58 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_SMP
|
2009-04-30 22:08:48 +00:00
|
|
|
#define __ASM_SMP_MB "\tmb\n"
|
2005-10-25 06:05:58 +00:00
|
|
|
#else
|
2009-04-30 22:08:48 +00:00
|
|
|
#define __ASM_SMP_MB
|
2005-10-25 06:05:58 +00:00
|
|
|
#endif
|
|
|
|
|
2013-11-06 13:57:36 +00:00
|
|
|
#include <asm-generic/barrier.h>
|
2005-10-25 06:05:58 +00:00
|
|
|
|
|
|
|
#endif /* __BARRIER_H */
|