linux-atomic.c (SYNC_LOCK_RELEASE): Place memory barrier before the lock release.
* arm/linux-atomic.c (SYNC_LOCK_RELEASE): Place memory barrier before the lock release. From-SVN: r154949
This commit is contained in:
parent
bcaf576b83
commit
cf9eb56580
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2009-12-03 Michael Matz <matz@suse.de>
|
||||||
|
|
||||||
PR middle-end/38474
|
PR middle-end/38474
|
||||||
|
|
|
@ -266,8 +266,10 @@ SUBWORD_TEST_AND_SET (char, 1)
|
||||||
void HIDDEN \
|
void HIDDEN \
|
||||||
__sync_lock_release_##WIDTH (TYPE *ptr) \
|
__sync_lock_release_##WIDTH (TYPE *ptr) \
|
||||||
{ \
|
{ \
|
||||||
*ptr = 0; \
|
/* All writes before this point must be seen before we release \
|
||||||
|
the lock itself. */ \
|
||||||
__kernel_dmb (); \
|
__kernel_dmb (); \
|
||||||
|
*ptr = 0; \
|
||||||
}
|
}
|
||||||
|
|
||||||
SYNC_LOCK_RELEASE (int, 4)
|
SYNC_LOCK_RELEASE (int, 4)
|
||||||
|
|
Loading…
Reference in New Issue