Make algorithm a bit more bulletproof.

This commit is contained in:
Alexander Motin
2009-06-23 23:16:37 +00:00
parent 1946089b52
commit 9f23a6caa4
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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)
+2 -2
View File
@@ -195,7 +195,7 @@ clkintr(struct trapframe *frame)
#endif
hardclockintr(frame);
} else {
if (--pscnt == 0) {
if (--pscnt <= 0) {
pscnt = psratio;
#ifdef SMP
if (smp_started)
@@ -293,7 +293,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)