diff options
author | julian <julian@FreeBSD.org> | 2007-03-08 06:44:34 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2007-03-08 06:44:34 +0000 |
commit | 80d6cde009b5766eaf8fb0ee64deb32113487939 (patch) | |
tree | f414b9c84952f9cf32c444f2ea351d4886916534 /sys/kern/kern_clock.c | |
parent | 3483dab550cf625cb12e9b0c98e86757477d7a9c (diff) | |
download | FreeBSD-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_clock.c')
-rw-r--r-- | sys/kern/kern_clock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index dbc6d20..063c2f3 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -450,7 +450,7 @@ statclock(int usermode) #endif td->td_pticks++; td->td_sticks++; - if (td != PCPU_GET(idlethread)) + if (!TD_IS_IDLETHREAD(td)) cp_time[CP_SYS]++; else cp_time[CP_IDLE]++; |