Adjust for new form of compare&exchange macros.
[kopensolaris-gnu/glibc.git] / nptl / pthread_timedjoin.c
index c83c0ef..1cc0721 100644 (file)
@@ -63,8 +63,8 @@ pthread_timedjoin_np (threadid, thread_return, abstime)
 
   /* Wait for the thread to finish.  If it is already locked something
      is wrong.  There can only be one waiter.  */
-  if (__builtin_expect (atomic_compare_and_exchange_acq (&pd->joinid, self,
-                                                        NULL) != 0, 0))
+  if (__builtin_expect (atomic_compare_and_exchange_bool_acq (&pd->joinid,
+                                                             self, NULL), 0))
     /* There is already somebody waiting for the thread.  */
     return EINVAL;