From dd6f8d0733c4c89e9e41f012e344f1c878b0c48c Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Wed, 5 Jul 2000 20:22:32 +0000 Subject: new timeouts --- sys/dev/wscons/wsdisplay.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sys/dev/wscons') 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 #include #include +#include #include #include @@ -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" */ } } -- cgit v1.2.3