aboutsummaryrefslogtreecommitdiff
path: root/nptl/pthread_join.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pthread_join.c')
-rw-r--r--nptl/pthread_join.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nptl/pthread_join.c b/nptl/pthread_join.c
index 5a0ec95722..f77c2c9f98 100644
--- a/nptl/pthread_join.c
+++ b/nptl/pthread_join.c
@@ -66,8 +66,9 @@ pthread_join (threadid, thread_return)
/* 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;