diff --git a/sys/kern/kern_idle.c b/sys/kern/kern_idle.c index 840c0f98fd56..b7d70314fb75 100644 --- a/sys/kern/kern_idle.c +++ b/sys/kern/kern_idle.c @@ -65,7 +65,7 @@ idle_setup(void *dummy) if (error) panic("idle_setup: kthread_create error %d\n", error); - gd->gd_idleproc->p_stat = SWAIT; + gd->gd_idleproc->p_stat = SRUN; } } @@ -100,7 +100,6 @@ idle_proc(void *dummy) } mtx_enter(&sched_lock, MTX_SPIN); - idleproc->p_stat = SWAIT; mi_switch(); mtx_exit(&sched_lock, MTX_SPIN); spl0(); diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c index 296e627c4a64..31c06f90be72 100644 --- a/sys/kern/kern_switch.c +++ b/sys/kern/kern_switch.c @@ -233,7 +233,6 @@ chooseproc(void) } else { CTR1(KTR_PROC, "chooseproc: idleproc, schedlock %lx", (long)sched_lock.mtx_lock); - idleproc->p_stat = SRUN; return idleproc; } p = TAILQ_FIRST(q);