[Spice-commits] spice/barrier.h
Arnon Gilboa
agilboa at kemper.freedesktop.org
Sun Feb 6 02:03:38 PST 2011
spice/barrier.h | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit d529c7d830f3650a4a6099942915e1703db31202
Author: Arnon Gilboa <agilboa at redhat.com>
Date: Wed Feb 2 11:21:11 2011 +0200
define spice_mb MemoryBarrier for WIN64
__asm is not supported on _WIN64, so use macro instead
required for Windows x64 guest display driver (qxldd.dll)
diff --git a/spice/barrier.h b/spice/barrier.h
index 8c81c86..710da09 100644
--- a/spice/barrier.h
+++ b/spice/barrier.h
@@ -33,14 +33,23 @@
#define _H_SPICE_BARRIER
#ifdef __GNUC__
+
#ifdef __i386__
#define spice_mb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory")
#else
//mfence
#define spice_mb() __asm__ __volatile__ ("lock; addl $0,0(%%rsp)": : :"memory")
#endif
+
+#else
+
+#ifdef _WIN64
+//__asm not supported on _WIN64, so use macro instead.
+#define spice_mb MemoryBarrier
#else
#define spice_mb() __asm {lock add [esp], 0}
#endif
+#endif
+
#endif /* _H_SPICE_BARRIER */
More information about the Spice-commits
mailing list