1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
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
This commit is contained in:
Ulrich Drepper
2003-03-20 07:19:17 +00:00
parent 85b5767c57
commit 4009bf4044
25 changed files with 91 additions and 575 deletions

View File

@ -1,5 +1,5 @@
/* Determine various system internal values, Linux version.
Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@ -31,7 +31,7 @@
#include <unistd.h>
#include <sys/sysinfo.h>
#include <atomicity.h>
#include <atomic.h>
/* The default value for the /proc filesystem mount point. */
@ -85,8 +85,7 @@ get_proc_path (char *buffer, size_t bufsize)
/* Now store the copied value. But do it atomically. */
assert (sizeof (long int) == sizeof (void *__unbounded));
if (compare_and_swap ((long int *) &mount_proc, (long int) 0,
(long int) copy_result) == 0)
if (atomic_compare_and_exchange_acq (&mount_proc, copy_result, NULL) == 0)
/* Replacing the value failed. This means another thread was
faster and we don't need the copy anymore. */
free (copy_result);