tag 660806 + patch thanks Hi,
The attached patch avoids the mfence instruction on i386. Contrary to the comment near the change, using __sync_synchronize on i386 does create a "lock orl" instruction, which is hopefully sufficient. -- Matt Kraai https://ftbfs.org/kraai
Index: libdispatch-0~svn197/src/hw_shims.h =================================================================== --- libdispatch-0~svn197.orig/src/hw_shims.h 2010-12-24 07:30:44.000000000 -0800 +++ libdispatch-0~svn197/src/hw_shims.h 2012-02-23 05:03:21.910448577 -0800 @@ -48,7 +48,7 @@ #define dispatch_atomic_sub(p, v) __sync_sub_and_fetch((p), (v)) #define dispatch_atomic_or(p, v) __sync_fetch_and_or((p), (v)) #define dispatch_atomic_and(p, v) __sync_fetch_and_and((p), (v)) -#if defined(__i386__) || defined(__x86_64__) +#if 0 && defined(__i386__) || defined(__x86_64__) /* GCC emits nothing for __sync_synchronize() on i386/x86_64. */ #define dispatch_atomic_barrier() __asm__ __volatile__("mfence") #else