tbb/tbb-2.2-mfence.patch

21 lines
881 B
Diff
Raw Normal View History

diff -up /home/petr/fedora/tbb/devel/tbb22_20090809oss-pm/include/tbb/machine/linux_ia32.h\~ /home/petr/fedora/tbb/devel/tbb22_20090809oss-pm/include/tbb/machine/linux_ia32.h
--- tbb22_20090809oss-pm/include/tbb/machine/linux_ia32.h~ 2009-08-12 09:05:03.000000000 +0200
+++ tbb22_20090809oss-pm/include/tbb/machine/linux_ia32.h 2010-06-10 17:11:17.000000000 +0200
@@ -39,7 +39,13 @@
#define __TBB_release_consistency_helper() __asm__ __volatile__("": : :"memory")
-inline void __TBB_rel_acq_fence() { __asm__ __volatile__("mfence": : :"memory"); }
+inline void __TBB_rel_acq_fence() {
+ int tmp;
+ __asm__ __volatile__("xchg %0,%0"
+ : "=r"(tmp)
+ : "r"(tmp)
+ : "memory");
+}
#define __MACHINE_DECL_ATOMICS(S,T,X) \
static inline T __TBB_machine_cmpswp##S (volatile void *ptr, T value, T comparand ) \
Diff finished. Thu Jun 10 17:13:43 2010