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/sbus/spif.c | |
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/sbus/spif.c')
-rw-r--r-- | sys/dev/sbus/spif.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/dev/sbus/spif.c b/sys/dev/sbus/spif.c index 75d88e5d9e1..260b8afbcdc 100644 --- a/sys/dev/sbus/spif.c +++ b/sys/dev/sbus/spif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spif.c,v 1.18 2010/06/28 14:13:34 deraadt Exp $ */ +/* $OpenBSD: spif.c,v 1.19 2010/07/02 17:27:01 nicm Exp $ */ /* * Copyright (c) 1999-2002 Jason L. Wright (jason@thought.net) @@ -740,13 +740,7 @@ stty_start(tp) s = spltty(); if (!ISSET(tp->t_state, TS_TTSTOP | TS_TIMEOUT | TS_BUSY)) { - 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); - } + ttwakeupwr(tp); if (tp->t_outq.c_cc) { sp->sp_txc = ndqb(&tp->t_outq, 0); sp->sp_txp = tp->t_outq.c_cf; |