diff options
-rw-r--r-- | kern/thread.c | 5 |
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); |