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 --- malloc/set-freeres.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'malloc/set-freeres.c') diff --git a/malloc/set-freeres.c b/malloc/set-freeres.c index 67488a8214..1c0733ec19 100644 --- a/malloc/set-freeres.c +++ b/malloc/set-freeres.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1997,1999,2000,2001,2002,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,7 +16,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include #include #include #include @@ -36,7 +36,7 @@ __libc_freeres (void) protect for multiple executions since these are fatal. */ static long int already_called; - if (compare_and_swap (&already_called, 0, 1)) + if (! atomic_compare_and_exchange_acq (&already_called, 1, 0)) { void * const *p; -- cgit v1.2.3