From 4009bf404450e4ad7b72140d7bae3226fad3468c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Mar 2003 07:19:17 +0000 Subject: Update. 2003-03-19 Ulrich Drepper * 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 --- sysdeps/unix/sysv/linux/getsysstats.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sysdeps/unix/sysv/linux/getsysstats.c') diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c index 55ef5b661a..c44e45ca6b 100644 --- a/sysdeps/unix/sysv/linux/getsysstats.c +++ b/sysdeps/unix/sysv/linux/getsysstats.c @@ -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 , 1996. @@ -31,7 +31,7 @@ #include #include -#include +#include /* 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); -- cgit 1.4.1