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/arch/sh/dev | |
parent | 4d2486b3dbf3e9ae0c6d38b616a80feed0b5e05a (diff) |
Move common code for waking up writers on a tty into a function.
ok deraadt matthew millert
Diffstat (limited to 'sys/arch/sh/dev')
-rw-r--r-- | sys/arch/sh/dev/scif.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/arch/sh/dev/scif.c b/sys/arch/sh/dev/scif.c index 2163eda9af5..7e832f7678c 100644 --- a/sys/arch/sh/dev/scif.c +++ b/sys/arch/sh/dev/scif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scif.c,v 1.13 2010/06/28 14:13:30 deraadt Exp $ */ +/* $OpenBSD: scif.c,v 1.14 2010/07/02 17:27:01 nicm Exp $ */ /* $NetBSD: scif.c,v 1.47 2006/07/23 22:06:06 ad Exp $ */ /*- @@ -485,15 +485,9 @@ scifstart(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. */ { |