[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxc: Update rmb/wmb for x86.
# HG changeset patch # User Keir Fraser <keir@xxxxxxx> # Date 1327166077 0 # Node ID 475d73479663b7bf85da84a7794df762aa2289a3 # Parent 7f71f0b4b8e66d2c4c95ae7419cd8fb858d6b3df libxc: Update rmb/wmb for x86. Only the compiler needs to see the barriers; not the CPU. Signed-off-by: Keir Fraser <keir@xxxxxxx> --- diff -r 7f71f0b4b8e6 -r 475d73479663 tools/libxc/xenctrl.h --- a/tools/libxc/xenctrl.h Sat Jan 21 16:47:00 2012 +0000 +++ b/tools/libxc/xenctrl.h Sat Jan 21 17:14:37 2012 +0000 @@ -69,14 +69,16 @@ * DEFINITIONS FOR CPU BARRIERS */ +#define xen_barrier() asm volatile ( "" : : : "memory") + #if defined(__i386__) #define xen_mb() asm volatile ( "lock; addl $0,0(%%esp)" : : : "memory" ) -#define xen_rmb() asm volatile ( "lock; addl $0,0(%%esp)" : : : "memory" ) -#define xen_wmb() asm volatile ( "" : : : "memory") +#define xen_rmb() xen_barrier() +#define xen_wmb() xen_barrier() #elif defined(__x86_64__) #define xen_mb() asm volatile ( "mfence" : : : "memory") -#define xen_rmb() asm volatile ( "lfence" : : : "memory") -#define xen_wmb() asm volatile ( "" : : : "memory") +#define xen_rmb() xen_barrier() +#define xen_wmb() xen_barrier() #elif defined(__ia64__) #define xen_mb() asm volatile ("mf" ::: "memory") #define xen_rmb() asm volatile ("mf" ::: "memory") _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |