diff options
| author | 2001-03-24 10:07:18 +0000 | |
|---|---|---|
| committer | 2001-03-24 10:07:18 +0000 | |
| commit | d7c8fbb3ead2bfb400d01470e753fd2b77197647 (patch) | |
| tree | e2176e3379b498f0729ca5113c0469688c1961f7 /sys/arch/sparc/dev/magma.c | |
| parent | Convert to new timeout API. mickey@ ok. (diff) | |
| download | wireguard-openbsd-d7c8fbb3ead2bfb400d01470e753fd2b77197647.tar.xz wireguard-openbsd-d7c8fbb3ead2bfb400d01470e753fd2b77197647.zip | |
Convert to new timeout API. art@ ok.
Diffstat (limited to 'sys/arch/sparc/dev/magma.c')
| -rw-r--r-- | sys/arch/sparc/dev/magma.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/arch/sparc/dev/magma.c b/sys/arch/sparc/dev/magma.c index b88584543a3..dca22b6734c 100644 --- a/sys/arch/sparc/dev/magma.c +++ b/sys/arch/sparc/dev/magma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: magma.c,v 1.6 2000/07/05 13:13:20 art Exp $ */ +/* $OpenBSD: magma.c,v 1.7 2001/03/24 10:07:19 ho Exp $ */ /* * magma.c * @@ -1409,6 +1409,9 @@ int port; mp->mp_cd1190 = &sc->ms_cd1190[port]; else mp->mp_cd1400 = &sc->ms_cd1400[0]; + + timeout_set(&mp->mp_timeout_tmo, mbpp_timeout, mp); + timeout_set(&mp->mp_start_tmo, mbpp_start, mp); } ms->ms_nports = port; @@ -1598,7 +1601,7 @@ int gotdata = 0; */ if( mp->mp_timeout > 0 ) { SET(mp->mp_flags, MBPPF_TIMEOUT); - timeout(mbpp_timeout, mp, mp->mp_timeout); + timeout_add(&mp->mp_timeout_tmo, mp->mp_timeout); } len = cnt = 0; @@ -1644,7 +1647,7 @@ again: /* goto bad */ if( mp->mp_delay > 0 ) { s = spltty(); /* XXX */ SET(mp->mp_flags, MBPPF_DELAY); - timeout(mbpp_start, mp, mp->mp_delay); + timeout_add(&mp->mp_start_tmo, mp->mp_delay); error = tsleep(mp, PCATCH | PZERO, "mbppdelay", 0); splx(s); if( error ) break; @@ -1666,11 +1669,11 @@ again: /* goto bad */ */ s = spltty(); /* XXX */ if( ISSET(mp->mp_flags, MBPPF_TIMEOUT) ) { - untimeout(mbpp_timeout, mp); + timeout_del(&mp->mp_timeout_tmo); CLR(mp->mp_flags, MBPPF_TIMEOUT); } if( ISSET(mp->mp_flags, MBPPF_DELAY) ) { - untimeout(mbpp_start, mp); + timeout_del(&mp->mp_start_tmo); CLR(mp->mp_flags, MBPPF_DELAY); } splx(s); |
