From 3e0af5ec85e0fe2f9cb51541466d2567ea534a8f Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 2 Jul 2010 17:27:02 +0000 Subject: Move common code for waking up writers on a tty into a function. ok deraadt matthew millert --- sys/dev/sbus/spif.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'sys/dev/sbus/spif.c') 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; -- cgit v1.2.3