summaryrefslogtreecommitdiff
path: root/pthread/pt-join.c
diff options
context:
space:
mode:
Diffstat (limited to 'pthread/pt-join.c')
-rw-r--r--pthread/pt-join.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pthread/pt-join.c b/pthread/pt-join.c
index 153058b..8bd2c6c 100644
--- a/pthread/pt-join.c
+++ b/pthread/pt-join.c
@@ -40,6 +40,8 @@ pthread_join (pthread_t thread, void **status)
pthread_cleanup_push ((void (*)(void *)) __pthread_mutex_unlock,
&pthread->state_lock);
+ /* Rely on pthread_cond_wait being a cancellation point to make
+ pthread_join one too. */
while (pthread->state == PTHREAD_JOINABLE)
pthread_cond_wait (&pthread->state_cond, &pthread->state_lock);