aboutsummaryrefslogtreecommitdiffstats
path: root/main/spice-protocol/portable-membarrier.patch
blob: 20a5ee331897eaaf1c35a2c9b8f6fa8b3f9503f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
See also: https://bugs.freedesktop.org/show_bug.cgi?id=86997

diff -ru spice-protocol-0.12.7/spice/barrier.h spice-0.12.5/spice-common/spice-protocol/spice/barrier.h
--- spice-protocol-0.12.7/spice/barrier.h	2013-12-10 20:42:54.000000000 -0200
+++ spice-protocol-0.12.7/spice/barrier.h	2014-12-04 13:45:54.593329844 -0200
@@ -34,12 +34,7 @@
 
 #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
+#define spice_mb() __sync_synchronize()
 
 #else