about summary refs log tree commit diff
path: root/nptl/pthread_key_delete.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pthread_key_delete.c')
-rw-r--r--nptl/pthread_key_delete.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nptl/pthread_key_delete.c b/nptl/pthread_key_delete.c
index a0145f8efa..ae7d7c459e 100644
--- a/nptl/pthread_key_delete.c
+++ b/nptl/pthread_key_delete.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -33,8 +33,8 @@ pthread_key_delete (key)
       unsigned int seq = __pthread_keys[key].seq;
 
       if (__builtin_expect (! KEY_UNUSED (seq), 1)
-	  && atomic_compare_and_exchange_acq (&__pthread_keys[key].seq,
-					      seq + 1, seq) == 0)
+	  && ! atomic_compare_and_exchange_bool_acq (&__pthread_keys[key].seq,
+						     seq + 1, seq))
 	/* We deleted a valid key.  */
 	result = 0;
     }