Lines Matching refs:tp

114 	struct tty *tp = fp->f_data;
115 struct pts_softc *psc = tty_softc(tp);
122 tty_lock(tp);
133 tty_unlock(tp);
147 if (ttydisc_getc_poll(tp)) {
154 tty_unlock(tp);
158 tty_lock(tp);
161 error = ttydisc_getc_uio(tp, uio);
174 error = cv_wait_sig(&psc->pts_outwait, tp->t_mtx);
179 tty_unlock(tp);
188 struct tty *tp = fp->f_data;
189 struct pts_softc *psc = tty_softc(tp);
202 tty_lock(tp);
214 rintlen = ttydisc_rint_simple(tp, ibstart, iblen);
235 ttydisc_rint_done(tp);
236 error = cv_wait_sig(&psc->pts_inwait, tp->t_mtx);
243 tty_unlock(tp);
246 done: ttydisc_rint_done(tp);
247 tty_unlock(tp);
261 struct tty *tp = fp->f_data;
262 struct pts_softc *psc = tty_softc(tp);
273 tty_lock(tp);
278 *(int *)data = ttydisc_getc_poll(tp);
280 tty_unlock(tp);
289 p = tty_devname(tp);
308 tty_lock(tp);
309 *(struct termios*)data = tp->t_termios;
310 tty_unlock(tp);
335 tty_lock(tp);
336 if (tp->t_pgrp != NULL)
337 *(int *)data = tp->t_pgrp->pg_id;
340 tty_unlock(tp);
344 tty_lock(tp);
345 if (tp->t_session == NULL)
348 *(int *)data = tp->t_session->s_sid;
349 tty_unlock(tp);
360 tty_lock(tp);
361 tty_signal_pgrp(tp, sig);
362 tty_unlock(tp);
366 tty_lock(tp);
371 tty_unlock(tp);
376 tty_lock(tp);
377 error = tty_ioctl(tp, cmd, data, fp->f_flag, td);
378 tty_unlock(tp);
389 struct tty *tp = fp->f_data;
390 struct pts_softc *psc = tty_softc(tp);
393 tty_lock(tp);
397 tty_unlock(tp);
403 if (ttydisc_getc_poll(tp) ||
409 if (ttydisc_rint_poll(tp))
431 tty_unlock(tp);
444 struct tty *tp = fp->f_data;
445 struct pts_softc *psc = tty_softc(tp);
454 struct tty *tp = fp->f_data;
455 struct pts_softc *psc = tty_softc(tp);
461 kn->kn_data = ttydisc_getc_poll(tp);
470 struct tty *tp = fp->f_data;
471 struct pts_softc *psc = tty_softc(tp);
480 struct tty *tp = fp->f_data;
481 struct pts_softc *psc = tty_softc(tp);
487 kn->kn_data = ttydisc_rint_poll(tp);
506 struct tty *tp = fp->f_data;
507 struct pts_softc *psc = tty_softc(tp);
510 tty_lock(tp);
526 tty_unlock(tp);
534 struct tty *tp = fp->f_data;
536 struct pts_softc *psc = tty_softc(tp);
538 struct cdev *dev = tp->t_dev;
555 sb->st_ino = sb->st_rdev = tty_udev(tp);
570 struct tty *tp = fp->f_data;
573 tty_lock(tp);
574 tty_rel_gone(tp);
591 struct tty *tp;
594 tp = fp->f_data;
595 kif->kf_un.kf_pts.kf_pts_dev = tty_udev(tp);
596 strlcpy(kif->kf_path, tty_devname(tp), sizeof(kif->kf_path));
621 ptsdrv_outwakeup(struct tty *tp)
623 struct pts_softc *psc = tty_softc(tp);
631 ptsdrv_inwakeup(struct tty *tp)
633 struct pts_softc *psc = tty_softc(tp);
641 ptsdrv_open(struct tty *tp)
643 struct pts_softc *psc = tty_softc(tp);
651 ptsdrv_close(struct tty *tp)
653 struct pts_softc *psc = tty_softc(tp);
657 ptsdrv_outwakeup(tp);
658 ptsdrv_inwakeup(tp);
662 ptsdrv_pktnotify(struct tty *tp, char event)
664 struct pts_softc *psc = tty_softc(tp);
686 ptsdrv_outwakeup(tp);
733 struct tty *tp;
769 tp = tty_alloc(&pts_class, psc);
770 knlist_init_mtx(&psc->pts_inpoll.si_note, tp->t_mtx);
771 knlist_init_mtx(&psc->pts_outpoll.si_note, tp->t_mtx);
774 tty_makedev(tp, td->td_ucred, "pts/%u", psc->pts_unit);
776 finit(fp, fflags, DTYPE_PTS, tp, &ptsdev_ops);
787 struct tty *tp;
816 tp = tty_alloc(&pts_class, psc);
817 knlist_init_mtx(&psc->pts_inpoll.si_note, tp->t_mtx);
818 knlist_init_mtx(&psc->pts_outpoll.si_note, tp->t_mtx);
821 tty_makedev(tp, td->td_ucred, "%s", name);
823 finit(fp, fflags, DTYPE_PTS, tp, &ptsdev_ops);