diff options
author | Richard Earnshaw <rearnsha@arm.com> | 2009-12-03 14:26:46 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2009-12-03 14:26:46 +0000 |
commit | cf9eb56580e4ebabff35cfa5484ece3c86f1120c (patch) | |
tree | cee4c3991885f7b08b311be973bc810a20c2b461 /gcc/config/arm/linux-atomic.c | |
parent | bcaf576b83e0c2332c2f78acb5ec7d060fdbab46 (diff) | |
download | gcc-cf9eb56580e4ebabff35cfa5484ece3c86f1120c.zip gcc-cf9eb56580e4ebabff35cfa5484ece3c86f1120c.tar.gz gcc-cf9eb56580e4ebabff35cfa5484ece3c86f1120c.tar.bz2 |
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
Diffstat (limited to 'gcc/config/arm/linux-atomic.c')
-rw-r--r-- | gcc/config/arm/linux-atomic.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) |