aboutsummaryrefslogtreecommitdiff
path: root/devel/linuxthreads
diff options
context:
space:
mode:
authorTor Egge <tegge@FreeBSD.org>2006-05-28 17:32:39 +0000
committerTor Egge <tegge@FreeBSD.org>2006-05-28 17:32:39 +0000
commitc717b11e0dd724c098bc375209b8ef88880f31f5 (patch)
treebdd9e437f40e3ce6a395f25c4a5d4548315a9380 /devel/linuxthreads
parent9e5965a07a3fed4642e6ba204d7661f12e29d2b3 (diff)
downloadports-c717b11e0dd724c098bc375209b8ef88880f31f5.tar.gz
ports-c717b11e0dd724c098bc375209b8ef88880f31f5.zip
Notes
Diffstat (limited to 'devel/linuxthreads')
-rw-r--r--devel/linuxthreads/files/patch-barrier21
1 files changed, 21 insertions, 0 deletions
diff --git a/devel/linuxthreads/files/patch-barrier b/devel/linuxthreads/files/patch-barrier
new file mode 100644
index 000000000000..f60402d634c0
--- /dev/null
+++ b/devel/linuxthreads/files/patch-barrier
@@ -0,0 +1,21 @@
+--- internals.h.orig Tue May 16 00:23:50 2006
++++ internals.h Tue May 16 00:24:21 2006
+@@ -395,12 +395,14 @@
+ #endif
+ }
+
+-/* If MEMORY_BARRIER isn't defined in pt-machine.h, assume the architecture
+- doesn't need a memory barrier instruction (e.g. Intel x86). Some
+- architectures distinguish between full, read and write barriers. */
++/* If MEMORY_BARRIER isn't defined in pt-machine.h, assume the
++ architecture doesn't need a memory barrier instruction (e.g. Intel
++ x86). Still we need the compiler to respect the barrier and emit
++ all outstanding operations which modify memory. Some architectures
++ distinguish between full, read and write barriers. */
+
+ #ifndef MEMORY_BARRIER
+-#define MEMORY_BARRIER()
++#define MEMORY_BARRIER() asm ("" : : : "memory")
+ #endif
+ #ifndef READ_MEMORY_BARRIER
+ #define READ_MEMORY_BARRIER() MEMORY_BARRIER()