summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/cx.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-07-22 01:30:45 +0000
committerbde <bde@FreeBSD.org>1995-07-22 01:30:45 +0000
commit688f94b1434ed320dfa1c4a16c80bac5f308daf5 (patch)
treec4afe09d343e52acfa2524ee2edbd4e49000cf11 /sys/i386/isa/cx.c
parent94cb7648d61aaab09b106f4dfb5fcd1e8c6c3cfc (diff)
downloadFreeBSD-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/i386/isa/cx.c')
-rw-r--r--sys/i386/isa/cx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/i386/isa/cx.c b/sys/i386/isa/cx.c
index c66f645..ff4b6b7 100644
--- a/sys/i386/isa/cx.c
+++ b/sys/i386/isa/cx.c
@@ -542,6 +542,9 @@ void cxoproc (struct tty *tp)
if (tp->t_state & (TS_SO_OCOMPLETE | TS_SO_OLOWAT) || tp->t_wsel)
ttwwakeup (tp);
#else /* FreeBSD 2.x and BSDI */
+#ifndef TS_ASLEEP /* FreeBSD some time after 2.0.5 */
+ ttwwakeup(tp);
+#else
if (RB_LEN (tp->t_out) <= tp->t_lowat) {
if (tp->t_state & TS_ASLEEP) {
tp->t_state &= ~TS_ASLEEP;
@@ -550,6 +553,7 @@ void cxoproc (struct tty *tp)
selwakeup(&tp->t_wsel);
}
#endif
+#endif
/*
* Enable TXMPTY interrupt,
* to catch the case when the second buffer is empty.
OpenPOWER on IntegriCloud