From 50b154be3672b61b459a7ae330131a931ed6d9b6 Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Sat, 3 Feb 2001 12:10:41 +0000 Subject: New timeouts. --- sys/arch/alpha/alpha/promcons.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sys/arch/alpha/alpha/promcons.c b/sys/arch/alpha/alpha/promcons.c index 222f9b9f4a3..4a0b09f1792 100644 --- a/sys/arch/alpha/alpha/promcons.c +++ b/sys/arch/alpha/alpha/promcons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: promcons.c,v 1.5 1997/01/24 19:56:43 niklas Exp $ */ +/* $OpenBSD: promcons.c,v 1.6 2001/02/03 12:10:40 art Exp $ */ /* $NetBSD: promcons.c,v 1.5 1996/11/13 22:20:55 cgd Exp $ */ /* @@ -42,6 +42,7 @@ #include #include #include +#include #include @@ -49,6 +50,7 @@ #include static struct tty *prom_tty[1]; +static struct timeout prom_to; void promstart __P((struct tty *)); void promtimeout __P((void *)); @@ -100,8 +102,10 @@ promopen(dev, flag, mode, p) splx(s); error = (*linesw[tp->t_line].l_open)(dev, tp); - if (error == 0 && setuptimeout) - timeout(promtimeout, tp, 1); + if (error == 0 && setuptimeout) { + timeout_set(&prom_to, promtimeout, tp); + timeout_add(&prom_to, 1); + } return error; } @@ -114,7 +118,7 @@ promclose(dev, flag, mode, p) int unit = minor(dev); struct tty *tp = prom_tty[unit]; - untimeout(promtimeout, tp); + timeout_del(&prom_to); (*linesw[tp->t_line].l_close)(tp, flag); ttyclose(tp); return 0; @@ -226,7 +230,7 @@ promtimeout(v) if (tp->t_state & TS_ISOPEN) (*linesw[tp->t_line].l_rint)(c, tp); } - timeout(promtimeout, tp, 1); + timeout_add(&prom_to, 1); } struct tty * -- cgit v1.2.3