summaryrefslogtreecommitdiff
path: root/sys/arch/vax/qbus
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/vax/qbus
parent4d2486b3dbf3e9ae0c6d38b616a80feed0b5e05a (diff)
Move common code for waking up writers on a tty into a function.
ok deraadt matthew millert
Diffstat (limited to 'sys/arch/vax/qbus')
-rw-r--r--sys/arch/vax/qbus/dhu.c10
-rw-r--r--sys/arch/vax/qbus/dl.c19
2 files changed, 8 insertions, 21 deletions
diff --git a/sys/arch/vax/qbus/dhu.c b/sys/arch/vax/qbus/dhu.c
index 4704c654201..04b2ee25c24 100644
--- a/sys/arch/vax/qbus/dhu.c
+++ b/sys/arch/vax/qbus/dhu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhu.c,v 1.17 2010/06/28 14:13:31 deraadt Exp $ */
+/* $OpenBSD: dhu.c,v 1.18 2010/07/02 17:27:01 nicm Exp $ */
/* $NetBSD: dhu.c,v 1.19 2000/06/04 06:17:01 matt Exp $ */
/*
* Copyright (c) 2003, Hugh Graham.
@@ -639,13 +639,7 @@ dhustart(tp)
if (tp->t_state & (TS_TIMEOUT|TS_BUSY|TS_TTSTOP))
goto out;
- 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);
- }
+ ttwakeupwr(tp);
if (tp->t_outq.c_cc == 0)
goto out;
cc = ndqb(&tp->t_outq, 0);
diff --git a/sys/arch/vax/qbus/dl.c b/sys/arch/vax/qbus/dl.c
index f337ce38329..e87ab207c59 100644
--- a/sys/arch/vax/qbus/dl.c
+++ b/sys/arch/vax/qbus/dl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dl.c,v 1.11 2010/06/28 14:13:31 deraadt Exp $ */
+/* $OpenBSD: dl.c,v 1.12 2010/07/02 17:27:01 nicm Exp $ */
/* $NetBSD: dl.c,v 1.11 2000/01/24 02:40:29 matt Exp $ */
/*-
@@ -456,18 +456,11 @@ dlstart(tp)
sc = dl_cd.cd_devs[unit];
s = spltty();
- if (tp->t_state & (TS_TIMEOUT|TS_BUSY|TS_TTSTOP))
- goto out;
- 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 out;
-
+ if (tp->t_state & (TS_TIMEOUT|TS_BUSY|TS_TTSTOP))
+ goto out;
+ ttwakeupwr(tp);
+ if (tp->t_outq.c_cc == 0)
+ goto out;
if (DL_READ_WORD(DL_UBA_XCSR) & DL_XCSR_TX_READY) {
tp->t_state |= TS_BUSY;