Commit Graph

11 Commits

Author SHA1 Message Date
Roland McGrath 859e708f0e * csu/tst-atomic.c (do_test): Add some new
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.
2003-03-26 04:02:03 +00:00
Andreas Schwab 9fdf211e68 *** empty log message ***
* sysdeps/m68k/m68020/bits/atomic.h: Fix typos.
	* include/atomic.h: Likewise.
2003-03-25 23:41:38 +00:00
Ulrich Drepper 09402f5bc1 Update.
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.
2003-03-25 20:41:26 +00:00
Roland McGrath fe4610b301 * include/atomic.h: Put parens around all macro arguments.
(__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.
2003-03-22 23:38:18 +00:00
Roland McGrath d15851ec24 * include/atomic.h (atomic_increment_and_test): Invert sense of test.
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.
2003-03-22 23:01:01 +00:00
Roland McGrath 916ff11ac7 2003-03-21 Roland McGrath <roland@redhat.com>
* include/atomic.h (atomic_compare_and_exchange_bool_acq): Typo fix.
2003-03-21 08:54:39 +00:00
Ulrich Drepper 18627f615b Define atomic_compare_and_exchange_val_acq, atomic_compare_and_exchange_val_rel, atomic_compare_and_exchange_bool_acq, and atomic_compare_and_exchange_bool_rel instead of atomic_compare_and_exchange_acq and atomic_compare_and_exchange_rel. 2003-03-21 07:37:36 +00:00
Ulrich Drepper 972209dd7a (atomic_decrement_if_positive): Adjust for the correct atomic_compare_and_exchange_acq semantics. 2003-03-20 19:42:54 +00:00
Roland McGrath 2ff16e041a * sysdeps/powerpc/bits/atomic.h (atomic_exchange): Remove unused
variable.  Remove superfluous memory clobber.

	* include/atomic.h: Syntax braino fix.

	* posix/tst-nice.c (do_test): Use %m formats instead of printing errno
	in decimal.  Don't bail if niced at start.  Just check that nice call
	bumps the total at all.
2003-03-20 11:40:51 +00:00
Ulrich Drepper 5132931e18 Define atomic_exchange and atomic_decrement_if_positive if not already defined. Add some __builtin_expect. 2003-03-20 10:11:43 +00:00
Ulrich Drepper 4009bf4044 Update.
2003-03-19  Ulrich Drepper  <drepper@redhat.com>

	* Makefile (distribute): Add include/atomic.h and bits/atomic.h.
	* include/atomic.h: New file.
	* sysdeps/i386/i486/bits/atomic.h: New file.
	* sysdeps/x86_64/bits/atomic.h: New file.
	* sysdeps/s390/bits/atomic.h: New file.
	* sysdeps/sh/bits/atomic.h: New file.
	* sysdeps/ia64/bits/atomic.h: New file.
	* sysdeps/powerpc/bits/atomic.h: New file.
	* sysdeps/generic/bits/atomic.h: New file.
	* sysdeps/i386/i486/atomicity.h: Removed.
	* sysdeps/x86_64/atomicity.h: Removed.
	* sysdeps/s390/s390-32/atomicity.h: Removed.
	* sysdeps/s390/s390-64/atomicity.h: Removed.
	* sysdeps/ia64/atomicity.h: Removed.
	* sysdeps/powerpc/powerpc32/atomicity.h: Removed.
	* sysdeps/powerpc/powerpc64/atomicity.h: Removed.
	* elf/dl-profile.c: Use atomic.h instead of atomicity.h.  Adjust
	use of macros from atomicity.h to new names and semantics.
	* gmon_mcount.c: Likewise.
	* malloc/set-freeres.c: Likewise.
	* nscd/cache.c: Likewise.
	* stdlib/cxa_finalize.c: Likewise.
	* sysdeps/unix/sysv/linux/getsysstats.c: Likewise.

	* sysdeps/mips/ieee754.h: New file, suitable to replace both
	* stdlib/strtod.c (INTERNAL): While eating trailing zeros handle
2003-03-20 07:19:17 +00:00