diff options
author | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2014-11-25 14:32:54 -0500 |
---|---|---|
committer | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2014-11-26 07:06:28 -0500 |
commit | 704f794714704ba430d84d10d6809acaf7ca59bf (patch) | |
tree | 753816581f7d1f54d4af4921d776077b31a9a4e4 /sysdeps/powerpc/powerpc32 | |
parent | cdcb42d7f786fe5ee1ca60065924d0b5c6649dd0 (diff) | |
download | glibc-704f794714704ba430d84d10d6809acaf7ca59bf.zip glibc-704f794714704ba430d84d10d6809acaf7ca59bf.tar.gz glibc-704f794714704ba430d84d10d6809acaf7ca59bf.tar.bz2 |
powerpc: Fix missing barriers in atomic_exchange_and_add_{acq,rel}
On powerpc, atomic_exchange_and_add is implemented without any
barriers. This patchs adds the missing instruction and memory barrier
for acquire and release semanthics.
Diffstat (limited to 'sysdeps/powerpc/powerpc32')
-rw-r--r-- | sysdeps/powerpc/powerpc32/bits/atomic.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc32/bits/atomic.h b/sysdeps/powerpc/powerpc32/bits/atomic.h index 117b5a0..e2a1bf4 100644 --- a/sysdeps/powerpc/powerpc32/bits/atomic.h +++ b/sysdeps/powerpc/powerpc32/bits/atomic.h @@ -98,6 +98,12 @@ #define __arch_atomic_exchange_and_add_64(mem, value) \ ({ abort (); (*mem) = (value); }) +#define __arch_atomic_exchange_and_add_64_acq(mem, value) \ + ({ abort (); (*mem) = (value); }) + +#define __arch_atomic_exchange_and_add_64_rel(mem, value) \ + ({ abort (); (*mem) = (value); }) + #define __arch_atomic_increment_val_64(mem) \ ({ abort (); (*mem)++; }) |