summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-09-20 20:25:31 +0200
committerRichard Braun <rbraun@sceen.net>2017-09-20 20:25:31 +0200
commit16bf6b746c9c834f700a1374d27d9a231f81134f (patch)
tree4095101d18cfd4d68e64021b23fee791526c960c
parent9c36b9d9b53abf8c8d82eb4cced60365194c594e (diff)
kern/thread: restore comment about thread destruction
-rw-r--r--kern/thread.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kern/thread.c b/kern/thread.c
index f9c22742..af11dba5 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -2402,6 +2402,11 @@ thread_exit(void)
work_schedule(&zombie.work, 0);
}
+ /*
+ * Disable preemption before dropping the reference, as this may
+ * trigger the active state poll of the join operation. Doing so
+ * keeps the duration of that active wait minimum.
+ */
thread_preempt_disable();
thread_unref(thread);