Lines Matching refs:tp

88 static int ttcompatgetflags(struct tty *tp);
89 static void ttcompatsetflags(struct tty *tp, struct termios *t);
90 static void ttcompatsetlflags(struct tty *tp, struct termios *t);
179 * Parameters struct tty *tp The tty on which the operation is
196 * Notes: This function may modify the contents of the tp->t_flags
200 * All other tp fields will remain unmodifed, since the struct
211 ttsetcompat(struct tty *tp, u_long *com, caddr_t data, struct termios *term)
232 else if (speed != ttcompatspeedtab(tp->t_ispeed, compatspeeds))
235 term->c_ispeed = tp->t_ispeed;
238 else if (speed != ttcompatspeedtab(tp->t_ospeed, compatspeeds))
241 term->c_ospeed = tp->t_ospeed;
244 tp->t_flags = (tp->t_flags&0xffff0000) | (sg->sg_flags&0xffff);
245 ttcompatsetflags(tp, term);
308 tp->t_flags = (tp->t_flags&0xffff) | *(int *)data<<16;
310 tp->t_flags =
311 (ttcompatgetflags(tp)&0xffff0000)|(tp->t_flags&0xffff);
313 tp->t_flags |= *(int *)data<<16;
315 tp->t_flags &= ~(*(int *)data<<16);
317 ttcompatsetlflags(tp, term);
333 * Parameters struct tty *tp The tty on which the operation is
361 ttcompat(struct tty *tp, u_long com, caddr_t data, int flag, struct proc *p)
379 term = tp->t_termios;
380 if ((error = ttsetcompat(tp, &com, data, &term)) != 0)
382 return ttioctl_locked(tp, com, (caddr_t) &term, flag, p);
391 register cc_t *cc = tp->t_cc;
393 sg->sg_ospeed = ttcompatspeedtab(tp->t_ospeed, compatspeeds);
394 if (tp->t_ispeed == 0)
397 sg->sg_ispeed = ttcompatspeedtab(tp->t_ispeed, compatspeeds);
400 sg->sg_flags = tp->t_flags = ttcompatgetflags(tp);
410 register cc_t *cc = tp->t_cc;
427 register cc_t *cc = tp->t_cc;
442 tp->t_flags =
443 (ttcompatgetflags(tp) & 0xffff0000UL)
444 | (tp->t_flags & 0xffff);
445 *(int *)data = tp->t_flags>>16;
453 *(int *)data = tp->t_line ? tp->t_line : 2;
464 return (ttioctl_locked(tp, TIOCSETD,
473 return (ttioctl_locked(tp, TIOCCONS, data, flag, p));
479 if (tp->t_session == NULL)
482 if (tp->t_session->s_leader == NULL)
485 *(int *) data = tp->t_session->s_leader->p_pid;
507 * Parameters struct tty *tp The tty on which the operation is
518 ttcompatgetflags(struct tty *tp)
520 register tcflag_t iflag = tp->t_iflag;
521 register tcflag_t lflag = tp->t_lflag;
522 register tcflag_t oflag = tp->t_oflag;
523 register tcflag_t cflag = tp->t_cflag;
582 * Parameters: struct tty *tp The tty on which the operation is
590 ttcompatsetflags(struct tty *tp, struct termios *t)
592 register int flags = tp->t_flags;
673 * Parameters: struct tty *tp The tty on which the operation is
681 ttcompatsetlflags(struct tty *tp, struct termios *t)
683 register int flags = tp->t_flags;