Go to the documentation of this file. 1#ifndef XTF_X86_BARRIER_H
2#define XTF_X86_BARRIER_H
26#define mb() __asm__ __volatile__ ("mfence" ::: "memory")
27#define rmb() __asm__ __volatile__ ("lfence" ::: "memory")
28#define wmb() __asm__ __volatile__ ("sfence" ::: "memory")
31#define smp_mb() __asm__ __volatile__ ("lock addl $0, -4(%%esp)" ::: "memory");
33#define smp_mb() __asm__ __volatile__ ("lock addl $0, -4(%%rsp)" ::: "memory");
35#define smp_rmb() barrier()
36#define smp_wmb() barrier()