diff options
author | jasone <jasone@FreeBSD.org> | 2001-08-16 06:31:32 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2001-08-16 06:31:32 +0000 |
commit | 6e7ccfd0939ba6aaace23d8e2434af0d3dd8ab28 (patch) | |
tree | 58d56e8f03dd7d3a15b34ecf3a5680c7e056fa65 /lib/libkse/thread/thr_join.c | |
parent | cd3f3aab8e337abe90764fb04a24c977624fdecd (diff) | |
download | FreeBSD-src-6e7ccfd0939ba6aaace23d8e2434af0d3dd8ab28.zip FreeBSD-src-6e7ccfd0939ba6aaace23d8e2434af0d3dd8ab28.tar.gz |
Fix a bug in canceling joining threads.
Do not detach canceled threads.
Reported by: Arno Klaassen <arno@heho.snv.jussieu.fr>
Collaboration with: deischen
Diffstat (limited to 'lib/libkse/thread/thr_join.c')
-rw-r--r-- | lib/libkse/thread/thr_join.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libkse/thread/thr_join.c b/lib/libkse/thread/thr_join.c index 968c24c..454c79a 100644 --- a/lib/libkse/thread/thr_join.c +++ b/lib/libkse/thread/thr_join.c @@ -121,6 +121,9 @@ _pthread_join(pthread_t pthread, void **thread_return) /* Set the running thread to be the joiner: */ pthread->joiner = curthread; + /* Keep track of which thread we're joining to: */ + curthread->data.thread = pthread; + /* Schedule the next thread: */ _thread_kern_sched_state(PS_JOIN, __FILE__, __LINE__); |