aboutsummaryrefslogtreecommitdiffstats
path: root/main/spice-protocol/portable-membarrier.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-12-04 16:50:22 +0200
committerTimo Teräs <timo.teras@iki.fi>2014-12-04 16:51:48 +0200
commit585223fdfa2496173856068f7c1663cd319833aa (patch)
tree3a7a8ebac2c64eb46990588356a0b0d5f8f655f7 /main/spice-protocol/portable-membarrier.patch
parent7db3ca7f0121a93cb15fce7d9f14e09e8850100a (diff)
downloadaports-585223fdfa2496173856068f7c1663cd319833aa.tar.bz2
aports-585223fdfa2496173856068f7c1663cd319833aa.tar.xz
main/spice-protocol: make memory barriers portable
Diffstat (limited to 'main/spice-protocol/portable-membarrier.patch')
-rw-r--r--main/spice-protocol/portable-membarrier.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/main/spice-protocol/portable-membarrier.patch b/main/spice-protocol/portable-membarrier.patch
new file mode 100644
index 0000000000..20a5ee3318
--- /dev/null
+++ b/main/spice-protocol/portable-membarrier.patch
@@ -0,0 +1,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
+