From 09402f5bc1d87787c84dbf75d41777c87b1ce40e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 25 Mar 2003 20:41:26 +0000 Subject: Update. 2003-03-25 Ulrich Drepper * csu/tst-atomic.c: Adjust tests to what atomic_add_negative and atomic_add_zero were supposed to do. * include/atomic.h: Adjust atomic_add_negative and atomic_add_zero to x86 behavior. * sysdeps/generic/bits/typesizes.h (__TIMER_T_TYPE): Define as void*. This matches the new timer implementation. * sysdeps/unix/sysv/linux/bits/siginfo.h (struct siginfo): Adjust timer info for what the kernel provides these days. (struct sigevent): Add _tid field. Define SIGEV_THREAD_ID. * Versions.def (librt): Add GLIBC_2.3.3. * abilist/libpthread.abilist: Update for nptl. --- include/atomic.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/atomic.h') diff --git a/include/atomic.h b/include/atomic.h index afebb789a3..3a0ec3a4be 100644 --- a/include/atomic.h +++ b/include/atomic.h @@ -189,13 +189,15 @@ #ifndef atomic_add_negative # define atomic_add_negative(mem, value) \ - (atomic_exchange_and_add ((mem), (value)) < 0) + ({ __typeof (value) __value = (value); \ + atomic_exchange_and_add ((mem), __value) < -__value); }) #endif #ifndef atomic_add_zero # define atomic_add_zero(mem, value) \ - (atomic_exchange_and_add ((mem), (value)) == 0) + ({ __typeof (value) __value = (value); \ + atomic_exchange_and_add ((mem), __value) == -__value; }) #endif -- cgit 1.4.1