From f08c2d4835ac6407cd0d1a3a068335347ce31238 Mon Sep 17 00:00:00 2001 From: deischen Date: Sat, 15 Dec 2001 15:52:24 +0000 Subject: Pull the target thread of a join operation from the correct place when cancelling a thread. --- lib/libpthread/thread/thr_cancel.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/libpthread/thread') diff --git a/lib/libpthread/thread/thr_cancel.c b/lib/libpthread/thread/thr_cancel.c index 7f40e36..67c1fb4 100644 --- a/lib/libpthread/thread/thr_cancel.c +++ b/lib/libpthread/thread/thr_cancel.c @@ -68,10 +68,11 @@ _pthread_cancel(pthread_t pthread) * Disconnect the thread from the joinee and * detach: */ - if (pthread->data.thread != NULL) { - pthread->data.thread->joiner = NULL; + if (pthread->join_status.thread != NULL) { + pthread->join_status.thread->joiner + = NULL; pthread_detach((pthread_t) - pthread->data.thread); + pthread->join_status.thread); } pthread->cancelflags |= PTHREAD_CANCELLING; PTHREAD_NEW_STATE(pthread, PS_RUNNING); -- cgit v1.1