summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2000-07-19 13:37:29 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2000-07-19 13:37:29 +0000
commitdf6af0363369b4a360782fc01c65a3429063a069 (patch)
treec287a0cebf16168cee51be8738076e1dfb7cd0ba /sys
parent2360300617ea8449b99c75e71e99e881c40ed085 (diff)
Many drivers use a timeout on ttrstrt, make this a generic interface.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/tty.c3
-rw-r--r--sys/sys/tty.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index fa632857111..1a7990146d1 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.40 2000/06/05 11:02:51 art Exp $ */
+/* $OpenBSD: tty.c,v 1.41 2000/07/19 13:37:28 art Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -2188,6 +2188,7 @@ tty_attach(tp)
TAILQ_INSERT_TAIL(&ttylist, tp, tty_link);
++tty_count;
+ timeout_set(&tp->t_rstrt_to, ttrstrt, tp);
}
/*
diff --git a/sys/sys/tty.h b/sys/sys/tty.h
index cf3ba77129a..f20656d61b7 100644
--- a/sys/sys/tty.h
+++ b/sys/sys/tty.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.h,v 1.4 1996/06/10 07:31:41 deraadt Exp $ */
+/* $OpenBSD: tty.h,v 1.5 2000/07/19 13:37:27 art Exp $ */
/* $NetBSD: tty.h,v 1.30.4.1 1996/06/02 09:08:13 mrg Exp $ */
/*-
@@ -44,6 +44,7 @@
#include <sys/termios.h>
#include <sys/select.h> /* For struct selinfo. */
#include <sys/queue.h>
+#include <sys/timeout.h>
#ifndef REAL_CLISTS
/*
@@ -112,6 +113,7 @@ struct tty {
short t_hiwat; /* High water mark. */
short t_lowat; /* Low water mark. */
short t_gen; /* Generation number. */
+ struct timeout t_rstrt_to; /* restart timeout */
};
#define t_cc t_termios.c_cc