diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-07-05 20:22:32 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-07-05 20:22:32 +0000 |
commit | dd6f8d0733c4c89e9e41f012e344f1c878b0c48c (patch) | |
tree | bc570597ece27c0ae37048aeabcabdafc4f499fb /sys/dev/wscons | |
parent | 3d6f277c7349d9f14842168473cfca77af8b292f (diff) |
new timeouts
Diffstat (limited to 'sys/dev/wscons')
-rw-r--r-- | sys/dev/wscons/wsdisplay.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c index 5744d991ed8..1adcf2531ff 100644 --- a/sys/dev/wscons/wsdisplay.c +++ b/sys/dev/wscons/wsdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay.c,v 1.1 2000/05/16 23:49:11 mickey Exp $ */ +/* $OpenBSD: wsdisplay.c,v 1.2 2000/07/05 20:22:31 mickey Exp $ */ /* $NetBSD: wsdisplay.c,v 1.36 2000/03/23 07:01:47 thorpej Exp $ */ /* @@ -47,6 +47,7 @@ #include <sys/errno.h> #include <sys/fcntl.h> #include <sys/vnode.h> +#include <sys/timeout.h> #include <dev/wscons/wsconsio.h> #include <dev/wscons/wsdisplayvar.h> @@ -78,6 +79,7 @@ struct wsscreen { struct wsscreen_internal *scr_dconf; struct tty *scr_tty; + struct timeout scr_rstrt; int scr_hold_screen; /* hold tty output */ int scr_flags; @@ -269,6 +271,7 @@ wsscreen_attach(sc, console, emul, type, cookie, ccol, crow, defattr) scr->scr_tty = ttymalloc(); tty_attach(scr->scr_tty); + timeout_set(&scr->scr_rstrt, ttrstrt, scr->scr_tty); scr->scr_hold_screen = 0; if (WSSCREEN_HAS_EMULATOR(scr)) scr->scr_flags = 0; @@ -290,6 +293,7 @@ wsscreen_detach(scr) int ccol, crow; /* XXX */ if (WSSCREEN_HAS_TTY(scr)) { + timeout_del(&scr->scr_rstrt); tty_detach(scr->scr_tty); ttyfree(scr->scr_tty); } @@ -1203,7 +1207,7 @@ wsdisplaystart(tp) /* Come back if there's more to do */ if (tp->t_outq.c_cc) { tp->t_state |= TS_TIMEOUT; - timeout(ttrstrt, tp, (hz > 128) ? (hz / 128) : 1); + timeout_add(&scr->scr_rstrt, (hz > 128) ? (hz / 128) : 1); } if (tp->t_outq.c_cc <= tp->t_lowat) { if (tp->t_state&TS_ASLEEP) { @@ -1685,7 +1689,7 @@ wsdisplay_kbdholdscreen(dev, hold) scr->scr_hold_screen = 1; else { scr->scr_hold_screen = 0; - timeout(ttrstrt, scr->scr_tty, 0); /* "immediate" */ + timeout_add(&scr->scr_rstrt, 0); /* "immediate" */ } } |