diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-07-28 02:19:49 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-07-28 02:30:15 -0400 |
commit | cf31a2c79957936b60de34ea1e718e892baf669c (patch) | |
tree | 68829b422bec72b81b34eac41edf559c389e3a83 /ChangeLog | |
parent | 18855eca3202da90bd4111168a1bf15f7100c435 (diff) | |
download | glibc-cf31a2c79957936b60de34ea1e718e892baf669c.zip glibc-cf31a2c79957936b60de34ea1e718e892baf669c.tar.gz glibc-cf31a2c79957936b60de34ea1e718e892baf669c.tar.bz2 |
ia64: atomic.h: fix atomic_exchange_and_add 64bit handling
Way back in 2005 the atomic_exchange_and_add function was cleaned up to
avoid the explicit size checking and instead let gcc handle things itself.
Unfortunately that change ended up leaving beyond a cast to int, even when
the incoming value was a long. This has flown under the radar for a long
time due to the function not being heavily used in the tree (especially as
a full 64bit field), but a recent change to semaphores made some nptl tests
fail reliably. This is due to the code packing two 32bit values into one
64bit variable (where the high 32bits contained the number of waiters), and
then the whole variable being atomically updated between threads. On ia64,
that meant we never atomically updated the count, so sometimes the sem_post
would not wake up the waiters.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1,5 +1,10 @@ 2015-07-27 Mike Frysinger <vapier@gentoo.org> + * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Define + directly in terms of __sync_fetch_and_add and delete (int) cast. + +2015-07-27 Mike Frysinger <vapier@gentoo.org> + * sysdeps/unix/sysv/linux/ia64/Makefile (CPPFLAGS): Delete the -D_ASM_IA64_CURRENT_H flag. |