about summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
Diffstat (limited to 'nscd')
-rw-r--r--nscd/cache.c6
1 files changed, 3 insertions, 3 deletions
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 <atomicity.h>
+#include <atomic.h>
 #include <errno.h>
 #include <error.h>
 #include <limits.h>
@@ -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)