Add releasing of input flow control into

ttyflush(FREAD)
This commit is contained in:
Andrey A. Chernov 1995-02-24 02:36:01 +00:00
parent 977e8ea0c9
commit 81c427da32
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6678

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)tty.c 8.8 (Berkeley) 1/21/94
* $Id: tty.c,v 1.29 1995/02/22 23:20:51 ache Exp $
* $Id: tty.c,v 1.28 1995/02/15 22:25:51 ache Exp $
*/
#include "snp.h"
@ -1083,6 +1083,16 @@ ttyflush(tp, rw)
wakeup((caddr_t)&tp->t_outq);
selwakeup(&tp->t_wsel);
}
if ((rw & FREAD) &&
ISSET(tp->t_state, TS_TBLOCK) && tp->t_rawq.c_cc < TTYHOG/5) {
if (ISSET(tp->t_iflag, IXOFF) &&
tp->t_cc[VSTART] != _POSIX_VDISABLE &&
putc(tp->t_cc[VSTART], &tp->t_outq) == 0 ||
ISSET(tp->t_cflag, CRTS_IFLOW)) {
CLR(tp->t_state, TS_TBLOCK);
ttstart(tp);
}
}
splx(s);
}