diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/midi.c | 5 | ||||
-rw-r--r-- | sys/dev/midivar.h | 4 | ||||
-rw-r--r-- | sys/dev/sequencer.c | 7 | ||||
-rw-r--r-- | sys/dev/sequencervar.h | 3 |
4 files changed, 12 insertions, 7 deletions
diff --git a/sys/dev/midi.c b/sys/dev/midi.c index 24e690ea4d9..b91c4904218 100644 --- a/sys/dev/midi.c +++ b/sys/dev/midi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: midi.c,v 1.4 2000/05/24 13:44:18 ho Exp $ */ +/* $OpenBSD: midi.c,v 1.5 2000/06/26 22:43:21 art Exp $ */ /* $NetBSD: midi.c,v 1.10 1998/12/20 14:26:44 drochner Exp $ */ /* @@ -170,6 +170,7 @@ midi_attach(sc, parent) sc->sc_dev = parent; sc->hw_if->getinfo(sc->hw_hdl, &mi); sc->props = mi.props; + timeout_set(&sc->timeo, midi_timeout, sc); printf(": <%s>\n", mi.name); } @@ -527,7 +528,7 @@ midi_start_output(sc, intr) psignal(sc->async, SIGIO); if (mb->used > 0) { if (!(sc->props & MIDI_PROP_OUT_INTR)) - timeout(midi_timeout, sc, midi_wait); + timeout_add(&sc->timeo, midi_wait); } else sc->pbus = 0; splx(s); diff --git a/sys/dev/midivar.h b/sys/dev/midivar.h index da3e1518d0f..2576d7e6051 100644 --- a/sys/dev/midivar.h +++ b/sys/dev/midivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: midivar.h,v 1.1 1999/01/02 00:02:38 niklas Exp $ */ +/* $OpenBSD: midivar.h,v 1.2 2000/06/26 22:43:22 art Exp $ */ /* $NetBSD: midivar.h,v 1.6 1998/11/25 22:17:07 augustss Exp $ */ /* @@ -43,6 +43,7 @@ #define MIDI_BUFSIZE 1024 #include "sequencer.h" +#include <sys/timeout.h> struct midi_buffer { u_char *inp; @@ -71,6 +72,7 @@ struct midi_softc { struct selinfo wsel; /* write selector */ struct selinfo rsel; /* read selector */ struct proc *async; /* process who wants audio SIGIO */ + struct timeout timeo; /* timeout handle */ /* MIDI input state machine */ int in_state; diff --git a/sys/dev/sequencer.c b/sys/dev/sequencer.c index 534673c21a9..24e484efdb3 100644 --- a/sys/dev/sequencer.c +++ b/sys/dev/sequencer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sequencer.c,v 1.3 2000/04/11 02:44:33 pjanzen Exp $ */ +/* $OpenBSD: sequencer.c,v 1.4 2000/06/26 22:43:44 art Exp $ */ /* $NetBSD: sequencer.c,v 1.13 1998/11/25 22:17:07 augustss Exp $ */ /* @@ -211,6 +211,7 @@ sequenceropen(dev, flags, ifmt, p) SEQ_QINIT(&sc->inq); SEQ_QINIT(&sc->outq); sc->lowat = SEQ_MAXQ / 2; + timeout_set(&sc->timo, seq_timeout, sc); seq_reset(sc); @@ -320,7 +321,7 @@ sequencerclose(dev, flags, ifmt, p) seq_drain(sc); s = splaudio(); if (sc->timeout) { - untimeout(seq_timeout, sc); + timeout_del(&sc->timo); sc->timeout = 0; } splx(s); @@ -894,7 +895,7 @@ seq_timer(sc, cmd, parm, b) } #endif sc->timeout = 1; - timeout(seq_timeout, sc, ticks); + timeout_add(&sc->timo, ticks); } #ifdef SEQUENCER_DEBUG else if (tick < 0) diff --git a/sys/dev/sequencervar.h b/sys/dev/sequencervar.h index 0d952867eeb..f124f1f10f3 100644 --- a/sys/dev/sequencervar.h +++ b/sys/dev/sequencervar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sequencervar.h,v 1.1 1999/01/02 00:02:39 niklas Exp $ */ +/* $OpenBSD: sequencervar.h,v 1.2 2000/06/26 22:43:45 art Exp $ */ /* $NetBSD: sequencervar.h,v 1.5 1998/11/25 22:17:07 augustss Exp $ */ /* @@ -89,6 +89,7 @@ struct sequencer_softc { struct selinfo wsel; /* write selector */ struct selinfo rsel; /* read selector */ struct proc *async; /* process who wants audio SIGIO */ + struct timeout timo; /* timeout handle */ char doingsysex; /* doing a SEQ_SYSEX */ |