diff options
Diffstat (limited to 'kern')
-rw-r--r-- | kern/thread.c | 5 | ||||
-rw-r--r-- | kern/work.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/kern/thread.c b/kern/thread.c index 21736cd0..09e15aa0 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); diff --git a/kern/work.c b/kern/work.c index 365ca30d..a841d38d 100644 --- a/kern/work.c +++ b/kern/work.c @@ -497,12 +497,13 @@ work_setup(void) INIT_OP_DEFINE(work_setup, INIT_OP_DEP(cpu_mp_probe, true), + INIT_OP_DEP(cpumap_setup, true), INIT_OP_DEP(kmem_setup, true), INIT_OP_DEP(log_setup, true), INIT_OP_DEP(panic_setup, true), INIT_OP_DEP(spinlock_setup, true), INIT_OP_DEP(syscnt_setup, true), - INIT_OP_DEP(thread_bootstrap, true)); + INIT_OP_DEP(thread_setup, true)); void work_schedule(struct work *work, int flags) |