diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2000-08-24 10:41:52 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2000-08-24 10:41:52 +0000 |
commit | f9ec6ca5c9a018b95f876d2d8632f58db1fe94a8 (patch) | |
tree | 06ff70f385ec144896b9dab49ac4229392e649f1 /sys/compat/hpux | |
parent | 47028e921e40eb887ee181e6825da4ffa5365596 (diff) |
Be careful about hzto returning <= 0.
Diffstat (limited to 'sys/compat/hpux')
-rw-r--r-- | sys/compat/hpux/hpux_compat.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/compat/hpux/hpux_compat.c b/sys/compat/hpux/hpux_compat.c index f55d32cd2ae..c7837715054 100644 --- a/sys/compat/hpux/hpux_compat.c +++ b/sys/compat/hpux/hpux_compat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hpux_compat.c,v 1.11 2000/06/26 16:22:11 art Exp $ */ +/* $OpenBSD: hpux_compat.c,v 1.12 2000/08/24 10:41:51 art Exp $ */ /* $NetBSD: hpux_compat.c,v 1.35 1997/05/08 16:19:48 mycroft Exp $ */ /* @@ -1298,6 +1298,7 @@ hpux_sys_alarm_6x(p, v, retval) syscallarg(int) deltat; } */ *uap = v; int s = splhigh(); + int timo; timeout_del(&p->p_realit_to); timerclear(&p->p_realtimer.it_interval); @@ -1312,7 +1313,10 @@ hpux_sys_alarm_6x(p, v, retval) } p->p_realtimer.it_value = time; p->p_realtimer.it_value.tv_sec += SCARG(uap, deltat); - timeout_add(&p->p_realit_to, hzto(&p->p_realtimer.it_value)); + timo = hzto(&p->p_realtimer.it_value); + if (timo <= 0) + timo = 1; + timeout_add(&p->p_realit_to, timo); splx(s); return (0); } |