Linux 3.11-rc3
[cris-mirror.git] / tools / virtio / asm / barrier.h
blobaff61e13306c7bba01f143802a63d6d866f31cf5
1 #if defined(__i386__) || defined(__x86_64__)
2 #define barrier() asm volatile("" ::: "memory")
3 #define mb() __sync_synchronize()
5 #define smp_mb() mb()
6 # define smp_rmb() barrier()
7 # define smp_wmb() barrier()
8 /* Weak barriers should be used. If not - it's a bug */
9 # define rmb() abort()
10 # define wmb() abort()
11 #else
12 #error Please fill in barrier macros
13 #endif