summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_join.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread/thread/thr_join.c')
-rw-r--r--lib/libpthread/thread/thr_join.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libpthread/thread/thr_join.c b/lib/libpthread/thread/thr_join.c
index 155dc64..1cffc96 100644
--- a/lib/libpthread/thread/thr_join.c
+++ b/lib/libpthread/thread/thr_join.c
@@ -97,11 +97,9 @@ pthread_join(pthread_t pthread, void **thread_return)
_thread_kern_sig_undefer();
- if ((_thread_run->cancelflags & PTHREAD_CANCEL_NEEDED) != 0) {
- _thread_run->cancelflags &= ~PTHREAD_CANCEL_NEEDED;
- _thread_exit_cleanup();
- pthread_exit(PTHREAD_CANCELED);
- }
+ if (_thread_run->interrupted != 0 &&
+ _thread_run->continuation != NULL)
+ _thread_run->continuation(_thread_run);
/* Check if the thread is not detached: */
if ((pthread->attr.flags & PTHREAD_DETACHED) == 0) {
OpenPOWER on IntegriCloud