summaryrefslogtreecommitdiff
path: root/sys/arch/aviion
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-07-02 17:27:02 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-07-02 17:27:02 +0000
commit3e0af5ec85e0fe2f9cb51541466d2567ea534a8f (patch)
tree98ea4006ae16bfe6a1b3730074d23b083948b395 /sys/arch/aviion
parent4d2486b3dbf3e9ae0c6d38b616a80feed0b5e05a (diff)
Move common code for waking up writers on a tty into a function.
ok deraadt matthew millert
Diffstat (limited to 'sys/arch/aviion')
-rw-r--r--sys/arch/aviion/dev/dart.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/arch/aviion/dev/dart.c b/sys/arch/aviion/dev/dart.c
index f2be4e0c7d3..0e3bb9dceae 100644
--- a/sys/arch/aviion/dev/dart.c
+++ b/sys/arch/aviion/dev/dart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dart.c,v 1.10 2010/06/28 14:13:27 deraadt Exp $ */
+/* $OpenBSD: dart.c,v 1.11 2010/07/02 17:27:01 nicm Exp $ */
/*
* Mach Operating System
@@ -262,15 +262,9 @@ dartstart(struct tty *tp)
if (tp->t_state & (TS_TIMEOUT | TS_BUSY | TS_TTSTOP))
goto bail;
- if (tp->t_outq.c_cc <= tp->t_lowat) {
- if (tp->t_state & TS_ASLEEP) {
- tp->t_state &= ~TS_ASLEEP;
- wakeup((caddr_t)&tp->t_outq);
- }
- selwakeup(&tp->t_wsel);
- if (tp->t_outq.c_cc == 0)
- goto bail;
- }
+ ttwakeupwr(tp);
+ if (tp->t_outq.c_cc == 0)
+ goto bail;
tp->t_state |= TS_BUSY;
while (tp->t_outq.c_cc != 0) {