diff options
author | mav <mav@FreeBSD.org> | 2009-06-23 23:16:37 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2009-06-23 23:16:37 +0000 |
commit | d34f6ea2864b06962fd8acf7d26aed2c860b20e8 (patch) | |
tree | 9da94a27196fed38391256691b4c9022c6b037b8 /sys/amd64 | |
parent | e37dfd03ba75615a12a749fd777bab4257e0ab69 (diff) | |
download | FreeBSD-src-d34f6ea2864b06962fd8acf7d26aed2c860b20e8.zip FreeBSD-src-d34f6ea2864b06962fd8acf7d26aed2c860b20e8.tar.gz |
Make algorithm a bit more bulletproof.
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/isa/clock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c index 2d2391e..adc1743 100644 --- a/sys/amd64/isa/clock.c +++ b/sys/amd64/isa/clock.c @@ -169,7 +169,7 @@ clkintr(struct trapframe *frame) #endif hardclockintr(frame); } else { - if (--pscnt == 0) { + if (--pscnt <= 0) { pscnt = psratio; #ifdef SMP if (smp_started) @@ -262,7 +262,7 @@ rtcintr(struct trapframe *frame) while (rtcin(RTC_INTR) & RTCIR_PERIOD) { flag = 1; - if (--pscnt == 0) { + if (--pscnt <= 0) { pscnt = psdiv; #ifdef SMP if (smp_started) |