diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2008-09-10 14:01:24 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2008-09-10 14:01:24 +0000 |
commit | 33d64896abc9e79070ec22125a832e7d8ef87878 (patch) | |
tree | 1f2297f6ceb3127f1cc36b8d9c89baeeceb16922 /sys/arch/i386 | |
parent | 528af50e90df2cf2ebdf638dc4d94752c1861936 (diff) |
Convert timeout_add() calls using multiples of hz to timeout_add_sec()
Really just the low-hanging fruit of (hopefully) forthcoming timeout
conversions.
ok art@, krw@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/esm.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/i386/longrun.c | 6 | ||||
-rw-r--r-- | sys/arch/i386/isa/pccom.c | 7 |
3 files changed, 9 insertions, 8 deletions
diff --git a/sys/arch/i386/i386/esm.c b/sys/arch/i386/i386/esm.c index b68a2684272..a8baa8e4b49 100644 --- a/sys/arch/i386/i386/esm.c +++ b/sys/arch/i386/i386/esm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: esm.c,v 1.47 2007/09/07 15:00:19 art Exp $ */ +/* $OpenBSD: esm.c,v 1.48 2008/09/10 14:01:22 blambert Exp $ */ /* * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -271,7 +271,7 @@ esm_attach(struct device *parent, struct device *self, void *aux) sc->sc_nextsensor = TAILQ_FIRST(&sc->sc_sensors); sc->sc_retries = 0; timeout_set(&sc->sc_timeout, esm_refresh, sc); - timeout_add(&sc->sc_timeout, hz); + timeout_add_sec(&sc->sc_timeout, 1); } } diff --git a/sys/arch/i386/i386/longrun.c b/sys/arch/i386/i386/longrun.c index 1ad14787a42..8c752df0e9b 100644 --- a/sys/arch/i386/i386/longrun.c +++ b/sys/arch/i386/i386/longrun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: longrun.c,v 1.13 2007/05/25 20:32:29 krw Exp $ */ +/* $OpenBSD: longrun.c,v 1.14 2008/09/10 14:01:22 blambert Exp $ */ /* * Copyright (c) 2003 Ted Unangst * Copyright (c) 2001 Tamotsu Hattori @@ -61,7 +61,7 @@ longrun_init(void) cpu_setperf = longrun_setperf; timeout_set(&longrun_timo, longrun_update, NULL); - timeout_add(&longrun_timo, hz); + timeout_add_sec(&longrun_timo, 1); } /* @@ -84,7 +84,7 @@ longrun_update(void *arg) cpuspeed = regs[0]; - timeout_add(&longrun_timo, hz); + timeout_add_sec(&longrun_timo, 1); } /* diff --git a/sys/arch/i386/isa/pccom.c b/sys/arch/i386/isa/pccom.c index 0f4ed063e03..9c1c4f6b2d0 100644 --- a/sys/arch/i386/isa/pccom.c +++ b/sys/arch/i386/isa/pccom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccom.c,v 1.64 2008/04/12 10:47:22 kettenis Exp $ */ +/* $OpenBSD: pccom.c,v 1.65 2008/09/10 14:01:22 blambert Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /* @@ -704,7 +704,7 @@ comclose(dev_t dev, int flag, int mode, struct proc *p) /* tty device is waiting for carrier; drop dtr then re-raise */ CLR(sc->sc_mcr, MCR_DTR | MCR_RTS); bus_space_write_1(iot, ioh, com_mcr, sc->sc_mcr); - timeout_add(&sc->sc_dtr_tmo, hz * 2); + timeout_add_sec(&sc->sc_dtr_tmo, 2); } else { /* no one else waiting; turn off the uart */ compwroff(sc); @@ -1268,7 +1268,8 @@ comsoft(void) if (ISSET(lsr, LSR_OE)) { sc->sc_overflows++; if (sc->sc_errors++ == 0) - timeout_add(&sc->sc_diag_tmo, 60 * hz); + timeout_add_sec( + &sc->sc_diag_tmo, 60); } rxget = (rxget + 1) & RBUFMASK; c |= lsrmap[(lsr & (LSR_BI|LSR_FE|LSR_PE)) >> 2]; |