From 6e1edcd6089049ffce201fa6be15944a5e16a1a3 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Wed, 15 Sep 2004 14:31:22 +0000 Subject: [PATCH] timeout/untimeout ==> callout_* --- sys/dev/raid/mlx/mlx.c | 9 +++++---- sys/dev/raid/mlx/mlxvar.h | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/dev/raid/mlx/mlx.c b/sys/dev/raid/mlx/mlx.c index a3b558596f..93264534e5 100644 --- a/sys/dev/raid/mlx/mlx.c +++ b/sys/dev/raid/mlx/mlx.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mlx/mlx.c,v 1.14.2.5 2001/09/11 09:49:53 kris Exp $ - * $DragonFly: src/sys/dev/raid/mlx/mlx.c,v 1.9 2004/06/21 15:39:31 dillon Exp $ + * $DragonFly: src/sys/dev/raid/mlx/mlx.c,v 1.10 2004/09/15 14:31:22 joerg Exp $ */ /* @@ -172,7 +172,7 @@ mlx_free(struct mlx_softc *sc) debug_called(1); /* cancel status timeout */ - untimeout(mlx_periodic, sc, sc->mlx_timeout); + callout_stop(&sc->mlx_timeout); /* throw away any command buffers */ while ((mc = TAILQ_FIRST(&sc->mlx_freecmds)) != NULL) { @@ -292,6 +292,7 @@ mlx_attach(struct mlx_softc *sc) int rid, error, fwminor, hscode, hserror, hsparam1, hsparam2, hsmsg; debug_called(1); + callout_init(&sc->mlx_timeout); /* * Initialise per-controller queues. @@ -489,7 +490,7 @@ mlx_attach(struct mlx_softc *sc) /* * Start the timeout routine. */ - sc->mlx_timeout = timeout(mlx_periodic, sc, hz); + callout_reset(&sc->mlx_timeout, hz, mlx_periodic, sc); /* print a little information about the controller */ mlx_describe_controller(sc); @@ -1059,7 +1060,7 @@ mlx_periodic(void *data) mlx_done(sc); /* reschedule another poll next second or so */ - sc->mlx_timeout = timeout(mlx_periodic, sc, hz); + callout_reset(&sc->mlx_timeout, hz, mlx_periodic, sc); } /******************************************************************************** diff --git a/sys/dev/raid/mlx/mlxvar.h b/sys/dev/raid/mlx/mlxvar.h index 468334df25..37c06305ba 100644 --- a/sys/dev/raid/mlx/mlxvar.h +++ b/sys/dev/raid/mlx/mlxvar.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mlx/mlxvar.h,v 1.5.2.3 2001/06/25 04:37:51 msmith Exp $ - * $DragonFly: src/sys/dev/raid/mlx/mlxvar.h,v 1.4 2004/05/19 22:52:47 dillon Exp $ + * $DragonFly: src/sys/dev/raid/mlx/mlxvar.h,v 1.5 2004/09/15 14:31:22 joerg Exp $ */ /* @@ -147,7 +147,7 @@ struct mlx_softc #define MLX_STATE_SHUTDOWN (1<<1) /* controller is shut down */ #define MLX_STATE_OPEN (1<<2) /* control device is open */ #define MLX_STATE_SUSPEND (1<<3) /* controller is suspended */ - struct callout_handle mlx_timeout; /* periodic status monitor */ + struct callout mlx_timeout; /* periodic status monitor */ time_t mlx_lastpoll; /* last time_second we polled for status */ u_int16_t mlx_lastevent; /* sequence number of the last event we recorded */ int mlx_currevent; /* sequence number last time we looked */ -- 2.32.0