Author: mav Date: Tue Jun 23 23:16:37 2009 New Revision: 194790 URL: http://svn.freebsd.org/changeset/base/194790
Log: Make algorithm a bit more bulletproof. Modified: head/sys/amd64/isa/clock.c head/sys/i386/isa/clock.c Modified: head/sys/amd64/isa/clock.c ============================================================================== --- head/sys/amd64/isa/clock.c Tue Jun 23 23:16:00 2009 (r194789) +++ head/sys/amd64/isa/clock.c Tue Jun 23 23:16:37 2009 (r194790) @@ -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) Modified: head/sys/i386/isa/clock.c ============================================================================== --- head/sys/i386/isa/clock.c Tue Jun 23 23:16:00 2009 (r194789) +++ head/sys/i386/isa/clock.c Tue Jun 23 23:16:37 2009 (r194790) @@ -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) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"