aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/ttydevsw.h
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2008-09-22 19:25:14 +0000
committerEd Schouten <ed@FreeBSD.org>2008-09-22 19:25:14 +0000
commita1215e37a4a98f22c84d4512dd380761376e8231 (patch)
treeb0edacd4932fd8b74d222a3adf26ec514131733e /sys/sys/ttydevsw.h
parent9545354ed523b2155638c43d4c2cc60498cfad4e (diff)
downloadsrc-a1215e37a4a98f22c84d4512dd380761376e8231.tar.gz
src-a1215e37a4a98f22c84d4512dd380761376e8231.zip
Introduce a hooks layer for the MPSAFE TTY layer.
One of the features that prevented us from fixing some of the TTY consumers to work once again, was an interface that allowed consumers to do the following: - `Sniff' incoming data, which is used by the snp(4) driver. - Take direct control of the input and output paths of a TTY, which is used by ng_tty(4), ppp(4), sl(4), etc. There's no practical advantage in committing a hooks layer without having any consumers. In P4 there is a preliminary port of snp(4) and thompsa@ is busy porting ng_tty(4) to this interface. I already want to have it in the tree, because this may stimulate others to work on the remaining modules. Discussed with: thompsa Obtained from: //depot/projects/mpsafetty/...
Notes
Notes: svn path=/head/; revision=183276
Diffstat (limited to 'sys/sys/ttydevsw.h')
-rw-r--r--sys/sys/ttydevsw.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/sys/ttydevsw.h b/sys/sys/ttydevsw.h
index 842143d6d911..e2278c3ab432 100644
--- a/sys/sys/ttydevsw.h
+++ b/sys/sys/ttydevsw.h
@@ -97,9 +97,7 @@ ttydevsw_outwakeup(struct tty *tp)
MPASS(!tty_gone(tp));
/* Prevent spurious wakeups. */
- if (tp->t_flags & TF_STOPPED)
- return;
- if (ttyoutq_bytesused(&tp->t_outq) == 0)
+ if (ttydisc_getc_poll(tp) == 0)
return;
tp->t_devsw->tsw_outwakeup(tp);