summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-06-26 07:48:50 +0000
committerbde <bde@FreeBSD.org>1995-06-26 07:48:50 +0000
commit4246201e1a94b7a5356e185fe33591255296d04d (patch)
treed660cb51db00252d0b92f0a0957e1474b56c3ed0 /sys
parentfa86e039e5dacb6dbfeca684d8f7d27674a160c6 (diff)
downloadFreeBSD-src-4246201e1a94b7a5356e185fe33591255296d04d.zip
FreeBSD-src-4246201e1a94b7a5356e185fe33591255296d04d.tar.gz
The pessimistic rounding in hzto() was too pessimistic for realitimexpire().
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_time.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c
index 319b00a..7828751 100644
--- a/sys/kern/kern_time.c
+++ b/sys/kern/kern_time.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)kern_time.c 8.1 (Berkeley) 6/10/93
- * $Id: kern_time.c,v 1.7 1995/03/16 18:12:38 bde Exp $
+ * $Id: kern_time.c,v 1.8 1995/05/30 08:05:47 rgrimes Exp $
*/
#include <sys/param.h>
@@ -295,6 +295,10 @@ setitimer(p, uap, retval)
* Else compute next time timer should go off which is > current time.
* This is where delay in processing this timeout causes multiple
* SIGALRM calls to be compressed into one.
+ * hzto() always adds 1 to allow for the time until the next clock
+ * interrupt being strictly less than 1 clock tick, but we don't want
+ * that here since we want to appear to be in sync with the clock
+ * interrupt even when we're delayed.
*/
void
realitexpire(arg)
@@ -315,7 +319,7 @@ realitexpire(arg)
&p->p_realtimer.it_interval);
if (timercmp(&p->p_realtimer.it_value, &time, >)) {
timeout(realitexpire, (caddr_t)p,
- hzto(&p->p_realtimer.it_value));
+ hzto(&p->p_realtimer.it_value) - 1);
splx(s);
return;
}
OpenPOWER on IntegriCloud