diff options
author | davidxu <davidxu@FreeBSD.org> | 2006-11-14 05:48:27 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2006-11-14 05:48:27 +0000 |
commit | c3c02312268d50e229a1f5c112837398be936657 (patch) | |
tree | 68b8a6e197a0c806eb5f24bcfa599618e2c2dc00 /sys/kern/sched_4bsd.c | |
parent | d71969c1c6c9d8a6ffd96d0b1d8bd4db03095907 (diff) | |
download | FreeBSD-src-c3c02312268d50e229a1f5c112837398be936657.zip FreeBSD-src-c3c02312268d50e229a1f5c112837398be936657.tar.gz |
Fix a copy-paste bug in NON-KSE case.
Diffstat (limited to 'sys/kern/sched_4bsd.c')
-rw-r--r-- | sys/kern/sched_4bsd.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index b085a14..b7511d9 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -589,20 +589,20 @@ schedcpu(void) * stop recalculating its priority until * it wakes up. */ - if (ke->ke_cpticks == 0) - continue; + if (ke->ke_cpticks != 0) { #if (FSHIFT >= CCPU_SHIFT) - ke->ke_pctcpu += (realstathz == 100) - ? ((fixpt_t) ke->ke_cpticks) << - (FSHIFT - CCPU_SHIFT) : - 100 * (((fixpt_t) ke->ke_cpticks) - << (FSHIFT - CCPU_SHIFT)) / realstathz; + ke->ke_pctcpu += (realstathz == 100) + ? ((fixpt_t) ke->ke_cpticks) << + (FSHIFT - CCPU_SHIFT) : + 100 * (((fixpt_t) ke->ke_cpticks) + << (FSHIFT - CCPU_SHIFT)) / realstathz; #else - ke->ke_pctcpu += ((FSCALE - ccpu) * - (ke->ke_cpticks * - FSCALE / realstathz)) >> FSHIFT; + ke->ke_pctcpu += ((FSCALE - ccpu) * + (ke->ke_cpticks * + FSCALE / realstathz)) >> FSHIFT; #endif - ke->ke_cpticks = 0; + ke->ke_cpticks = 0; + } #endif /* |