summaryrefslogtreecommitdiffstats
path: root/sys/kern/sched_ule.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2007-03-08 06:44:34 +0000
committerjulian <julian@FreeBSD.org>2007-03-08 06:44:34 +0000
commit80d6cde009b5766eaf8fb0ee64deb32113487939 (patch)
treef414b9c84952f9cf32c444f2ea351d4886916534 /sys/kern/sched_ule.c
parent3483dab550cf625cb12e9b0c98e86757477d7a9c (diff)
downloadFreeBSD-src-80d6cde009b5766eaf8fb0ee64deb32113487939.zip
FreeBSD-src-80d6cde009b5766eaf8fb0ee64deb32113487939.tar.gz
Instead of doing comparisons using the pcpu area to see if
a thread is an idle thread, just see if it has the IDLETD flag set. That flag will probably move to the pflags word as it's permenent and never chenges for the life of the system so it doesn't need locking.
Diffstat (limited to 'sys/kern/sched_ule.c')
-rw-r--r--sys/kern/sched_ule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index f52cbc8..2a62798 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -1436,7 +1436,7 @@ sched_switch(struct thread *td, struct thread *newtd, int flags)
* If the thread has been assigned it may be in the process of switching
* to the new cpu. This is the case in sched_bind().
*/
- if (td == PCPU_GET(idlethread)) {
+ if (TD_IS_IDLETHREAD(td)) {
TD_SET_CAN_RUN(td);
} else {
tdq_load_rem(tdq, ts);
OpenPOWER on IntegriCloud