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/usb | |
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/usb')
-rw-r--r-- | sys/dev/usb/ucom.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index 6f58bb6bb7e..9a6050170d2 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ucom.c,v 1.49 2010/06/30 09:36:51 nicm Exp $ */ +/* $OpenBSD: ucom.c,v 1.50 2010/07/02 17:27:01 nicm Exp $ */ /* $NetBSD: ucom.c,v 1.49 2003/01/01 00:10:25 thorpej Exp $ */ /* @@ -943,15 +943,9 @@ ucomstart(struct tty *tp) if (sc->sc_tx_stopped) 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; /* Grab the first contiguous region of buffer space. */ data = tp->t_outq.c_cf; |