diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-07-02 17:27:02 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-07-02 17:27:02 +0000 |
commit | 3e0af5ec85e0fe2f9cb51541466d2567ea534a8f (patch) | |
tree | 98ea4006ae16bfe6a1b3730074d23b083948b395 /sys/dev/pci | |
parent | 4d2486b3dbf3e9ae0c6d38b616a80feed0b5e05a (diff) |
Move common code for waking up writers on a tty into a function.
ok deraadt matthew millert
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/cz.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/dev/pci/cz.c b/sys/dev/pci/cz.c index 99befa0d60e..f51338df5cc 100644 --- a/sys/dev/pci/cz.c +++ b/sys/dev/pci/cz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cz.c,v 1.17 2010/06/28 14:13:33 deraadt Exp $ */ +/* $OpenBSD: cz.c,v 1.18 2010/07/02 17:27:01 nicm Exp $ */ /* $NetBSD: cz.c,v 1.15 2001/01/20 19:10:36 thorpej Exp $ */ /*- @@ -1480,15 +1480,9 @@ czttystart(struct tty *tp) if (ISSET(tp->t_state, TS_BUSY | TS_TIMEOUT | TS_TTSTOP)) goto out; - if (tp->t_outq.c_cc <= tp->t_lowat) { - if (ISSET(tp->t_state, TS_ASLEEP)) { - CLR(tp->t_state, TS_ASLEEP); - wakeup(&tp->t_outq); - } - selwakeup(&tp->t_wsel); - if (tp->t_outq.c_cc == 0) - goto out; - } + ttwakeupwr(tp); + if (tp->t_outq.c_cc == 0) + goto out; cztty_transmit(sc, tp); out: |