Lines Matching refs:tp

117 	struct tty *tp = fp->f_data;
118 struct pts_softc *psc = tty_softc(tp);
125 tty_lock(tp);
136 tty_unlock(tp);
150 if (ttydisc_getc_poll(tp)) {
157 tty_unlock(tp);
161 tty_lock(tp);
164 error = ttydisc_getc_uio(tp, uio);
177 error = cv_wait_sig(&psc->pts_outwait, tp->t_mtx);
182 tty_unlock(tp);
191 struct tty *tp = fp->f_data;
192 struct pts_softc *psc = tty_softc(tp);
205 tty_lock(tp);
217 rintlen = ttydisc_rint_simple(tp, ibstart, iblen);
238 ttydisc_rint_done(tp);
239 error = cv_wait_sig(&psc->pts_inwait, tp->t_mtx);
246 tty_unlock(tp);
249 done: ttydisc_rint_done(tp);
250 tty_unlock(tp);
264 struct tty *tp = fp->f_data;
265 struct pts_softc *psc = tty_softc(tp);
276 tty_lock(tp);
281 *(int *)data = ttydisc_getc_poll(tp);
283 tty_unlock(tp);
292 p = tty_devname(tp);
311 tty_lock(tp);
312 *(struct termios*)data = tp->t_termios;
313 tty_unlock(tp);
338 tty_lock(tp);
339 if (tp->t_pgrp != NULL)
340 *(int *)data = tp->t_pgrp->pg_id;
343 tty_unlock(tp);
347 tty_lock(tp);
348 if (tp->t_session == NULL)
351 *(int *)data = tp->t_session->s_sid;
352 tty_unlock(tp);
363 tty_lock(tp);
364 tty_signal_pgrp(tp, sig);
365 tty_unlock(tp);
369 tty_lock(tp);
374 tty_unlock(tp);
379 tty_lock(tp);
380 error = tty_ioctl(tp, cmd, data, fp->f_flag, td);
381 tty_unlock(tp);
392 struct tty *tp = fp->f_data;
393 struct pts_softc *psc = tty_softc(tp);
396 tty_lock(tp);
400 tty_unlock(tp);
406 if (ttydisc_getc_poll(tp) ||
412 if (ttydisc_rint_poll(tp))
434 tty_unlock(tp);
447 struct tty *tp = fp->f_data;
448 struct pts_softc *psc = tty_softc(tp);
457 struct tty *tp = fp->f_data;
458 struct pts_softc *psc = tty_softc(tp);
464 kn->kn_data = ttydisc_getc_poll(tp);
473 struct tty *tp = fp->f_data;
474 struct pts_softc *psc = tty_softc(tp);
483 struct tty *tp = fp->f_data;
484 struct pts_softc *psc = tty_softc(tp);
490 kn->kn_data = ttydisc_rint_poll(tp);
509 struct tty *tp = fp->f_data;
510 struct pts_softc *psc = tty_softc(tp);
513 tty_lock(tp);
529 tty_unlock(tp);
537 struct tty *tp = fp->f_data;
539 struct pts_softc *psc = tty_softc(tp);
541 struct cdev *dev = tp->t_dev;
558 sb->st_ino = sb->st_rdev = tty_udev(tp);
573 struct tty *tp = fp->f_data;
576 tty_lock(tp);
577 tty_rel_gone(tp);
594 struct tty *tp;
597 tp = fp->f_data;
598 kif->kf_un.kf_pts.kf_pts_dev = tty_udev(tp);
601 strlcpy(kif->kf_path, tty_devname(tp), sizeof(kif->kf_path));
626 ptsdrv_outwakeup(struct tty *tp)
628 struct pts_softc *psc = tty_softc(tp);
636 ptsdrv_inwakeup(struct tty *tp)
638 struct pts_softc *psc = tty_softc(tp);
646 ptsdrv_open(struct tty *tp)
648 struct pts_softc *psc = tty_softc(tp);
656 ptsdrv_close(struct tty *tp)
658 struct pts_softc *psc = tty_softc(tp);
662 ptsdrv_outwakeup(tp);
663 ptsdrv_inwakeup(tp);
667 ptsdrv_pktnotify(struct tty *tp, char event)
669 struct pts_softc *psc = tty_softc(tp);
691 ptsdrv_outwakeup(tp);
738 struct tty *tp;
774 tp = tty_alloc(&pts_class, psc);
775 knlist_init_mtx(&psc->pts_inpoll.si_note, tp->t_mtx);
776 knlist_init_mtx(&psc->pts_outpoll.si_note, tp->t_mtx);
779 tty_makedev(tp, td->td_ucred, "pts/%u", psc->pts_unit);
781 finit(fp, fflags, DTYPE_PTS, tp, &ptsdev_ops);
792 struct tty *tp;
821 tp = tty_alloc(&pts_class, psc);
822 knlist_init_mtx(&psc->pts_inpoll.si_note, tp->t_mtx);
823 knlist_init_mtx(&psc->pts_outpoll.si_note, tp->t_mtx);
826 tty_makedev(tp, td->td_ucred, "%s", name);
828 finit(fp, fflags, DTYPE_PTS, tp, &ptsdev_ops);