diff options
author | bde <bde@FreeBSD.org> | 1995-07-22 01:30:45 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-07-22 01:30:45 +0000 |
commit | 688f94b1434ed320dfa1c4a16c80bac5f308daf5 (patch) | |
tree | c4afe09d343e52acfa2524ee2edbd4e49000cf11 /sys/gnu | |
parent | 94cb7648d61aaab09b106f4dfb5fcd1e8c6c3cfc (diff) | |
download | FreeBSD-src-688f94b1434ed320dfa1c4a16c80bac5f308daf5.zip FreeBSD-src-688f94b1434ed320dfa1c4a16c80bac5f308daf5.tar.gz |
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.
Diffstat (limited to 'sys/gnu')
-rw-r--r-- | sys/gnu/isdn/iitty.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sys/gnu/isdn/iitty.c b/sys/gnu/isdn/iitty.c index 63f19ad..f5fc948 100644 --- a/sys/gnu/isdn/iitty.c +++ b/sys/gnu/isdn/iitty.c @@ -1,6 +1,6 @@ -static char _ittyid[] = "@(#)$Id: iitty.c,v 1.6 1995/07/21 16:30:37 bde Exp $"; +static char _ittyid[] = "@(#)$Id: iitty.c,v 1.7 1995/07/21 20:52:21 bde Exp $"; /******************************************************************************* - * II - Version 0.1 $Revision: 1.6 $ $State: Exp $ + * II - Version 0.1 $Revision: 1.7 $ $State: Exp $ * * Copyright 1994 Dietmar Friede ******************************************************************************* @@ -10,6 +10,12 @@ static char _ittyid[] = "@(#)$Id: iitty.c,v 1.6 1995/07/21 16:30:37 bde Exp * ******************************************************************************* * $Log: iitty.c,v $ + * Revision 1.7 1995/07/21 20:52:21 bde + * Obtained from: partly from ancient patches by ache and me via 1.1.5 + * + * Nuke `symbolic sleep message strings'. Use unique literal messages so that + * `ps l' shows unambiguously where processes are sleeping. + * * Revision 1.6 1995/07/21 16:30:37 bde * Obtained from: partly from an ancient patch of mine via 1.1.5 * @@ -226,15 +232,7 @@ itystart(struct tty *tp) splx(s); return; } - if (tp->t_outq.c_cc <= tp->t_lowat) - { - if (tp->t_state & TS_ASLEEP) - { - tp->t_state &= ~TS_ASLEEP; - wakeup((caddr_t) & tp->t_outq); - } - selwakeup(&tp->t_wsel); - } + ttwwakeup(tp); if (tp->t_outq.c_cc) { if(OUTBOUND(tp->t_dev) && (tp->t_cflag & CLOCAL) && |