about summary refs log tree commit diff
path: root/nptl/pthread_setcancelstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pthread_setcancelstate.c')
-rw-r--r--nptl/pthread_setcancelstate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nptl/pthread_setcancelstate.c b/nptl/pthread_setcancelstate.c
index 3f6ed863c3..a6af063d67 100644
--- a/nptl/pthread_setcancelstate.c
+++ b/nptl/pthread_setcancelstate.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.
 
@@ -54,8 +54,8 @@ __pthread_setcancelstate (state, oldstate)
 
       /* Update the cancel handling word.  This has to be done
 	 atomically since other bits could be modified as well.  */
-      if (atomic_compare_and_exchange_acq (&self->cancelhandling, newval,
-					   oldval) == 0)
+      if (! atomic_compare_and_exchange_bool_acq (&self->cancelhandling,
+						  newval, oldval))
 	{
 	  if (CANCEL_ENABLED_AND_CANCELED_AND_ASYNCHRONOUS (newval))
 	    __do_cancel ();