diff options
author | deischen <deischen@FreeBSD.org> | 2001-12-15 15:52:24 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2001-12-15 15:52:24 +0000 |
commit | f08c2d4835ac6407cd0d1a3a068335347ce31238 (patch) | |
tree | 3c681367908f13778131be7b2722dca34eadca2c /lib/libc_r/uthread | |
parent | 09d8ef72f9ad4e1807d293c700382592749610ce (diff) | |
download | FreeBSD-src-f08c2d4835ac6407cd0d1a3a068335347ce31238.zip FreeBSD-src-f08c2d4835ac6407cd0d1a3a068335347ce31238.tar.gz |
Pull the target thread of a join operation from the correct place
when cancelling a thread.
Diffstat (limited to 'lib/libc_r/uthread')
-rw-r--r-- | lib/libc_r/uthread/uthread_cancel.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc_r/uthread/uthread_cancel.c b/lib/libc_r/uthread/uthread_cancel.c index 7f40e36..67c1fb4 100644 --- a/lib/libc_r/uthread/uthread_cancel.c +++ b/lib/libc_r/uthread/uthread_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); |