about summary refs log tree commit diff
path: root/csu/tst-atomic.c
Commit message (Collapse)AuthorAgeFilesLines
* * csu/tst-atomic.c (do_test): Add some newRoland McGrath2003-03-261-1/+81
| | | | | | | | | | | | | | | | | | | | | | atomic_compare_and_exchange_val_acq, atomic_add_zero, atomic_compare_and_exchange_bool_acq and atomic_add_negative tests. * include/atomic.h (atomic_add_negative, atomic_add_zero): Prefix local variable so that it doesn't clash with the one in atomic_exchange_and_add. * sysdeps/ia64/bits/atomic.h (atomic_exchange): Fix for long/void * pointers. (atomic_exchange_and_add): Implement using __sync_fetch_and_add_?i. * sysdeps/powerpc/bits/atomic.h (atomic_exchange_and_add): Force value into register. * sysdeps/s390/bits/atomic.h (__arch_compare_and_exchange_val_64_acq): Cast newval to long. * sysdeps/x86_64/bits/atomic.h (__arch_compare_and_exchange_val_64_acq): Cast newval and oldval to long. (atomic_exchange): Cast newvalue to long if sizeof == 8. (atomic_exchange_and_add): Cast value to long if sizeof == 8. (atomic_add, atomic_add_negative, atomic_add_zero): Likewise. (atomic_bit_set): Shift 1L up in all cases to shut up warnings.
* Update.Ulrich Drepper2003-03-251-5/+5
| | | | | | | | | | | | | | | | | | | | 2003-03-25 Ulrich Drepper <drepper@redhat.com> * 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: Put parens around all macro arguments.Roland McGrath2003-03-221-2/+18
| | | | | | | | | (__atomic_val_bysize, __atomic_bool_bysize): New macros. (atomic_compare_and_exchange_val_acq): Use it. (atomic_compare_and_exchange_bool_acq): Likewise. (atomic_increment_and_test): Invert sense of test. (atomic_decrement_and_test): Likewise. * csu/tst-atomic.c: Update those tests to match.
* * include/atomic.h (atomic_increment_and_test): Invert sense of test.Roland McGrath2003-03-221-0/+277
Add comment. (atomic_decrement_and_test): Add comment. 2003-03-22 Jakub Jelinek <jakub@redhat.com> * include/atomic.h (atomic_compare_and_exchange_val_acq): Add comment. Don't define if __arch_compare_and_exchange_val_32_acq is not defined. (atomic_compare_and_exchange_bool_acq): Add comment. Don't use __oldval variable in the macro, since it might be macro argument. (atomic_decrement_if_positive): Initialize __memp, remove setting of non-existent variable. (atomic_bit_test_set): Cast 1 to __typeof (*mem) before shifting. * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Implement using atomic_compare_and_exchange_val_acq. (atomic_decrement_if_positive, atomic_bit_test_set): Define. * sysdeps/s390/bits/atomic.h (__arch_compare_and_exchange_val_8_acq): Renamed from... (__arch_compare_and_exchange_bool_8_acq): ... this. (__arch_compare_and_exchange_val_16_acq): Renamed from... (__arch_compare_and_exchange_bool_16_acq): ... this. (__arch_compare_and_exchange_val_32_acq): Return old value. Renamed from... (__arch_compare_and_exchange_bool_32_acq): ... this. (__arch_compare_and_exchange_val_64_acq): Return old value. Renamed from... (__arch_compare_and_exchange_bool_64_acq): ... this. (__arch_compare_and_exchange_val_32_acq): Use __typeof for local variables types instead of assuming int. Change prefix of local variables to __arch. * sysdeps/generic/bits/atomic.h (arch_compare_and_exchange_acq): Remove. (atomic_compare_and_exchange_val_acq, atomic_compare_and_exchange_bool_acq): Define. * csu/tst-atomic.c: New test. * csu/tst-atomic-long.c: New test. * csu/Makefile (tests): Add tst-atomic and tst-atomic-long. * malloc/memusagestat.c (main): Kill warning if uint64_t is ulong. * sysdeps/s390/Versions: Add trailing newline. * sysdeps/unix/sysv/linux/sysconf.c (__sysconf): Kill warning if INTERNAL_SYSCALL_ERROR_P doesn't use its first argument.