summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_switch.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_switch.c')
-rw-r--r--sys/kern/kern_switch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c
index 348a521b8..cd952439 100644
--- a/sys/kern/kern_switch.c
+++ b/sys/kern/kern_switch.c
@@ -153,9 +153,9 @@ choosethread(void)
CTR2(KTR_RUNQ, "choosethread: td=%p pri=%d",
td, td->td_priority);
} else {
- /* Pretend the idle thread was on the run queue. */
+ /* Simulate runq_choose() having returned the idle thread */
td = PCPU_GET(idlethread);
- td->td_kse->ke_state = KES_UNQUEUED;
+ td->td_kse->ke_state = KES_RUNNING;
CTR1(KTR_RUNQ, "choosethread: td=%p (idle)", td);
}
td->td_state = TDS_RUNNING;
OpenPOWER on IntegriCloud