summaryrefslogtreecommitdiffstats
path: root/lib/libkse/thread
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2001-12-15 15:52:24 +0000
committerdeischen <deischen@FreeBSD.org>2001-12-15 15:52:24 +0000
commitf08c2d4835ac6407cd0d1a3a068335347ce31238 (patch)
tree3c681367908f13778131be7b2722dca34eadca2c /lib/libkse/thread
parent09d8ef72f9ad4e1807d293c700382592749610ce (diff)
downloadFreeBSD-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/libkse/thread')
-rw-r--r--lib/libkse/thread/thr_cancel.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libkse/thread/thr_cancel.c b/lib/libkse/thread/thr_cancel.c
index 7f40e36..67c1fb4 100644
--- a/lib/libkse/thread/thr_cancel.c
+++ b/lib/libkse/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);
OpenPOWER on IntegriCloud