Lines Matching refs:tp

47 	register struct tty *tp = &cons;  local
51 tp->t_oproc = cnstart;
52 if ((tp->t_state&TS_ISOPEN) == 0) {
53 ttychars(tp);
54 tp->t_iflag = TTYDEF_IFLAG|ICRNL;
55 tp->t_oflag = TTYDEF_OFLAG|OPOST|ONLCR;
56 tp->t_lflag = TTYDEF_LFLAG;
57 tp->t_cflag = CS8|CREAD;
58 tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
59 tp->t_state = TS_ISOPEN|TS_CARR_ON;
60 ttsetwater(tp);
62 if (tp->t_state&TS_XCLUDE && u.u_uid != 0)
66 return ((*linesw[tp->t_line].l_open)(dev, tp));
75 register struct tty *tp = &cons; local
79 (*linesw[tp->t_line].l_close)(tp, flag);
80 ttyclose(tp);
90 register struct tty *tp = &cons; local
94 return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
103 register struct tty *tp = &cons; local
108 tp = constty;
112 return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
126 register struct tty *tp; local
139 tp = &cons;
141 if (!kdbrintr(c, tp))
143 if ((tp->t_cflag&CSIZE) == CS7) {
145 if (tp->t_cflag&PARENB) {
146 if ((tp->t_cflag&PARODD) &&
155 (*linesw[tp->t_line].l_rint)(c, tp);
163 register struct tty *tp = &cons; local
168 error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, addr);
171 error = ttioctl(tp, cmd, addr, flag);
188 register struct tty *tp = &cons; local
191 tp->t_state &= ~TS_BUSY;
192 if (tp->t_line)
193 (*linesw[tp->t_line].l_start)(tp);
195 cnstart(tp);
197 if (cpu==VAX_780 && (tp->t_state & TS_BUSY) == 0)
202 cnstart(tp) in cnstart() argument
203 register struct tty *tp; in cnstart()
208 if (tp->t_state & (TS_TIMEOUT|TS_BUSY|TS_TTSTOP))
210 if (tp->t_outq.c_cc <= tp->t_lowat) {
211 if (tp->t_state&TS_ASLEEP) {
212 tp->t_state &= ~TS_ASLEEP;
213 wakeup((caddr_t)&tp->t_outq);
215 if (tp->t_wsel) {
216 selwakeup(tp->t_wsel, tp->t_state & TS_WCOLL);
217 tp->t_wsel = 0;
218 tp->t_state &= ~TS_WCOLL;
221 if (tp->t_outq.c_cc == 0)
225 c = getc(&tp->t_outq) & 0xff;
227 if (tp->t_cflag&PARENB && ((tp->t_cflag&CSIZE)==CS7)) {
229 c |= (tp->t_cflag&PARODD ? ~partab[c] : partab[c]) & 0200;
232 if ((tp->t_cflag&CSIZE) == CS7) {
234 if (tp->t_cflag&PARENB) {
235 if (tp->t_cflag&PARODD)
246 tp->t_state |= TS_BUSY;