Allow for output processing routine to handle entire character buffer
and thus not require a sleep/wakeup. Reviewed by: Submitted by:
This commit is contained in:
parent
8b75418fcc
commit
4470f3d596
@ -1531,8 +1531,10 @@ ttwrite(tp, uio, flag)
|
||||
uio->uio_resid += cc;
|
||||
return (uio->uio_resid == cnt ? EWOULDBLOCK : 0);
|
||||
}
|
||||
SET(tp->t_state, TS_ASLEEP);
|
||||
error = ttysleep(tp, &tp->t_outq, TTOPRI | PCATCH, ttyout, 0);
|
||||
if (tp->t_outq.c_cc || ISSET(tp->t_state, TS_BUSY)) {
|
||||
SET(tp->t_state, TS_ASLEEP);
|
||||
error = ttysleep(tp, &tp->t_outq, TTOPRI | PCATCH, ttyout, 0);
|
||||
}
|
||||
splx(s);
|
||||
if (error)
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user