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 --- nscd/cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nscd') diff --git a/nscd/cache.c b/nscd/cache.c index d8339e915d..788d47bbd9 100644 --- a/nscd/cache.c +++ b/nscd/cache.c @@ -17,7 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include #include #include #include @@ -101,8 +101,8 @@ cache_add (int type, void *key, size_t len, const void *packet, size_t total, /* Put the new entry in the first position. */ do newp->next = table->array[hash]; - while (! compare_and_swap ((volatile long int *) &table->array[hash], - (long int) newp->next, (long int) newp)); + while (atomic_compare_and_exchange_acq (&table->array[hash], newp, + newp->next)); /* Update the statistics. */ if (data == (void *) -1) -- cgit 1.4.1