summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_synch.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/kern_synch.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/kern_synch.c')
-rw-r--r--sys/kern/kern_synch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 4fceafb..0edd670 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -428,7 +428,7 @@ mi_switch(int flags, struct thread *newtd)
CTR4(KTR_PROC, "mi_switch: old thread %ld (kse %p, pid %ld, %s)",
td->td_tid, td->td_sched, p->p_pid, p->p_comm);
#if (KTR_COMPILE & KTR_SCHED) != 0
- if (td == PCPU_GET(idlethread))
+ if (TD_IS_IDLETHREAD(td))
CTR3(KTR_SCHED, "mi_switch: %p(%s) prio %d idle",
td, td->td_proc->p_comm, td->td_priority);
else if (newtd != NULL)
OpenPOWER on IntegriCloud