summaryrefslogtreecommitdiff
path: root/kern/thread.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-08-23 21:57:22 +0200
committerRichard Braun <rbraun@sceen.net>2017-08-23 21:57:22 +0200
commit1fcd8e7e40c3c10b4b694be3786b8a9cb7a38391 (patch)
tree16cf532032a48dbc784adc5cafc855fab38b9c69 /kern/thread.h
parent079e1f89354dd275d2a2096f3df5d0ddfd24bb12 (diff)
kern/thread: really fix termination
Change the semantics of thread_join so that it not only waits for thread_exit but also for the last reference to be dropped.
Diffstat (limited to 'kern/thread.h')
-rw-r--r--kern/thread.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kern/thread.h b/kern/thread.h
index 43a98e8..f565c15 100644
--- a/kern/thread.h
+++ b/kern/thread.h
@@ -291,7 +291,7 @@ thread_unref(struct thread *thread)
assert(nr_refs != 0);
if (nr_refs == 1) {
- thread_destroy(thread);
+ thread_terminate(thread);
}
}