[RFC,01/13] add smp_mb()

Submitted by Paolo Bonzini on Aug. 15, 2011, 9:08 p.m.

Details

Message ID 1313442520-12062-2-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini Aug. 15, 2011, 9:08 p.m.
We'll need a full memory barrier, and __sync_synchronize() is
just too ugly to type.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 qemu-barrier.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch hide | download patch | download mbox

diff --git a/qemu-barrier.h b/qemu-barrier.h
index b77fce2..7bd5268 100644
--- a/qemu-barrier.h
+++ b/qemu-barrier.h
@@ -4,6 +4,8 @@ 
 /* FIXME: arch dependant, x86 version */
 #define smp_wmb()   asm volatile("" ::: "memory")
 
+#define smp_mb()    __sync_synchronize()
+
 /* Compiler barrier */
 #define barrier()   asm volatile("" ::: "memory")