Make algorithm a bit more bulletproof.
This commit is contained in:
parent
1946089b52
commit
9f23a6caa4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=194790
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user