summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2002-07-12 20:16:46 +0000
committerjulian <julian@FreeBSD.org>2002-07-12 20:16:46 +0000
commitc5495020cb1a3babc0521d7c9de49291cd5fb515 (patch)
tree2f51458cc61cb741bc63a52d85f1e282dc18f6f5
parent931ad6a4ffaf4a1b424d80d26cce2e3ba7921c73 (diff)
downloadFreeBSD-src-c5495020cb1a3babc0521d7c9de49291cd5fb515.zip
FreeBSD-src-c5495020cb1a3babc0521d7c9de49291cd5fb515.tar.gz
also set the KSE state for the idle KSE/thread case.
-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