From 688f94b1434ed320dfa1c4a16c80bac5f308daf5 Mon Sep 17 00:00:00 2001 From: bde Date: Sat, 22 Jul 1995 01:30:45 +0000 Subject: Move the inline code for waking up writers to a new function ttwwakeup(). The conditions for doing the wakeup will soon become more complicated and I don't want them duplicated in all drivers. It's probably not worth making ttwwakeup() a macro or an inline function. The cost of the function call is relatively small when there is a process to wake up. There is usually a process to wake up for large writes and the system call overhead dwarfs the function call overhead for small writes. --- sys/dev/sio/sio.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'sys/dev/sio/sio.c') diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index d880196..39683e9 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.102 1995/07/05 14:30:07 bde Exp $ + * $Id: sio.c,v 1.103 1995/07/21 22:51:34 bde Exp $ */ #include "sio.h" @@ -71,7 +71,6 @@ */ #define TSA_CARR_ON(tp) ((void *)&(tp)->t_rawq) #define TSA_OCOMPLETE(tp) ((void *)&(tp)->t_outq) -#define TSA_OLOWAT(tp) ((void *)&(tp)->t_outq) #define LOTS_OF_EVENTS 64 /* helps separate urgent events from input */ #define RB_I_HIGH_WATER (TTYHOG - 2 * RS_IBUFSIZE) @@ -1868,19 +1867,7 @@ comstart(tp) if (com->state >= (CS_BUSY | CS_TTGO)) siointr1(com); /* fake interrupt to start output */ enable_intr(); - -#if 0 /* XXX TK2.0 */ - if (tp->t_state & (TS_SO_OCOMPLETE | TS_SO_OLOWAT) || tp->t_wsel) - ttwwakeup(tp); -#else - if (tp->t_outq.c_cc <= tp->t_lowat) { - if (tp->t_state & TS_ASLEEP) { - tp->t_state &= ~TS_ASLEEP; - wakeup(TSA_OLOWAT(tp)); - } - selwakeup(&tp->t_wsel); - } -#endif + ttwwakeup(tp); splx(s); } -- cgit v1.1