rossc@metro.oz (Ross Cartlidge) (12/16/85)
When using rn(1) on a sxt(7) device you will notice that that characters are often discarded in the prompts. This is because rn(1) uses the ioctl(2) call TCSETAF to throw away type ahead between each question. The sxt driver, however, doesn't support the BUSY bit in t_state. Thus as soon as the output queue to the sxt device empties input and output is flushed (see ttiocom and ttywait in io/tty.c). The flush of the sxt device, however, is translated into a flush of the real device, which may still be transmitting characters, thus these characters are lost. FIX: Simply make the t_state bit BUSY reflect whether output is pending on the associated sxt channel. The following diff(1) applied to io/sxt.c implements this strategy. 747a748 > vtp->t_state |= BUSY; 798a800 > vtp->t_state &= ~BUSY; 873a876 > vtp->t_state &= ~BUSY; 940a944 > vtp->t_state &= ~BUSY;
jsdy@hadron.UUCP (Joseph S. D. Yao) (12/25/85)
In article <133@metro.oz> rossc@metro.oz (Ross Cartlidge) writes: >747a748 >> vtp->t_state |= BUSY; >798a800 >> vtp->t_state &= ~BUSY; >873a876 >> vtp->t_state &= ~BUSY; >940a944 >> vtp->t_state &= ~BUSY; These line numbers match version 6.5 of the sxt driver under s5r2.0v1 on our VAX-11/780. Under s5r2.0v2, our version 6.7, the line numbers are: 742, 793, 868, 935. Ross was good enough to tell me that each of these immediately precedes a change to lp->wpending, and send a more complete (sort-of-context) diff. On our working version, the line numbers are: 751, 802, 877, 944. This includes fixes to allow the VAX console to use sxt (posted separately). -- Joe Yao hadron!jsdy@seismo.{CSS.GOV,ARPA,UUCP}