summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-02-03 12:10:41 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-02-03 12:10:41 +0000
commit50b154be3672b61b459a7ae330131a931ed6d9b6 (patch)
tree064f379feca1dceab824eb48c1465d28eacfe25e /sys/arch
parent60fe8422c65ec61d655a840f63ec3faea9f30d2d (diff)
New timeouts.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/alpha/promcons.c14
1 files 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 <sys/syslog.h>
#include <sys/types.h>
#include <sys/device.h>
+#include <sys/timeout.h>
#include <dev/cons.h>
@@ -49,6 +50,7 @@
#include <machine/prom.h>
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 *