before the lock release.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154949
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-12-03 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm/linux-atomic.c (SYNC_LOCK_RELEASE): Place memory barrier
+ before the lock release.
+
2009-12-03 Michael Matz <matz@suse.de>
PR middle-end/38474
void HIDDEN \
__sync_lock_release_##WIDTH (TYPE *ptr) \
{ \
- *ptr = 0; \
+ /* All writes before this point must be seen before we release \
+ the lock itself. */ \
__kernel_dmb (); \
+ *ptr = 0; \
}
SYNC_LOCK_RELEASE (int, 4)