diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/arm/linux-atomic.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0c99c6e..258890d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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> PR middle-end/38474 diff --git a/gcc/config/arm/linux-atomic.c b/gcc/config/arm/linux-atomic.c index 14d4a53..20ad296 100644 --- a/gcc/config/arm/linux-atomic.c +++ b/gcc/config/arm/linux-atomic.c @@ -266,8 +266,10 @@ SUBWORD_TEST_AND_SET (char, 1) 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) |