Lines Matching refs:pti
263 struct ptmx_ioctl *pti = pty_get_ioctl(dev, PF_OPEN_S, &driver); in ptsopen() local
264 if (pti == NULL) { in ptsopen()
267 if (!(pti->pt_flags & PF_UNLOCKED)) { in ptsopen()
272 struct tty *tp = pti->pt_tty; in ptsopen()
334 struct ptmx_ioctl *pti = pty_get_ioctl(dev, 0, &driver); in ptsclose() local
337 if (pti == NULL) { in ptsclose()
341 tp = pti->pt_tty; in ptsclose()
374 struct ptmx_ioctl *pti = pty_get_ioctl(dev, 0, NULL); in ptsread() local
379 if (pti == NULL) { in ptsread()
382 tp = pti->pt_tty; in ptsread()
402 struct ptmx_ioctl *pti = pty_get_ioctl(dev, 0, NULL); in ptswrite() local
406 if (pti == NULL) { in ptswrite()
409 tp = pti->pt_tty; in ptswrite()
434 struct ptmx_ioctl *pti = pty_get_ioctl(tp->t_dev, 0, NULL); in ptsstart() local
435 if (pti == NULL) { in ptsstart()
441 if (pti->pt_flags & PF_STOPPED) { in ptsstart()
442 pti->pt_flags &= ~PF_STOPPED; in ptsstart()
443 pti->pt_send = TIOCPKT_START; in ptsstart()
466 struct ptmx_ioctl *pti = pty_get_ioctl(tp->t_dev, 0, NULL); in ptcwakeup() local
467 if (pti == NULL) { in ptcwakeup()
472 selwakeup(&pti->pt_selr); in ptcwakeup()
474 ptcwakeup_knote(&pti->pt_selr, 1); in ptcwakeup()
477 selwakeup(&pti->pt_selw); in ptcwakeup()
479 ptcwakeup_knote(&pti->pt_selw, 1); in ptcwakeup()
487 struct ptmx_ioctl *pti = pty_get_ioctl(dev, PF_OPEN_M, &driver); in ptcopen() local
488 if (pti == NULL) { in ptcopen()
490 } else if (pti == (struct ptmx_ioctl*)-1) { in ptcopen()
494 struct tty *tp = pti->pt_tty; in ptcopen()
519 pti->pt_flags = PF_UNLOCKED; in ptcopen()
520 pti->pt_send = 0; in ptcopen()
521 pti->pt_ucntl = 0; in ptcopen()
532 struct ptmx_ioctl *pti = pty_get_ioctl(dev, 0, &driver); in ptcclose() local
537 if (!pti) { in ptcclose()
541 tp = pti->pt_tty; in ptcclose()
599 knote(&pti->pt_selr.si_note, NOTE_REVOKE, true); in ptcclose()
600 selthreadclear(&pti->pt_selr); in ptcclose()
601 knote(&pti->pt_selw.si_note, NOTE_REVOKE, true); in ptcclose()
602 selthreadclear(&pti->pt_selw); in ptcclose()
619 struct ptmx_ioctl *pti = pty_get_ioctl(dev, 0, NULL); local
624 if (pti == NULL) {
627 tp = pti->pt_tty;
638 if (pti->pt_flags & PF_PKT && pti->pt_send) {
639 error = ureadc((int)pti->pt_send, uio);
643 if (pti->pt_send & TIOCPKT_IOCTL) {
664 pti->pt_send = 0;
667 if (pti->pt_flags & PF_UCNTL && pti->pt_ucntl) {
668 error = ureadc((int)pti->pt_ucntl, uio);
672 pti->pt_ucntl = 0;
691 if (pti->pt_flags & (PF_PKT | PF_UCNTL)) {
717 struct ptmx_ioctl *pti = pty_get_ioctl(tp->t_dev, 0, NULL); local
720 if (pti == NULL) {
727 pti->pt_flags |= PF_STOPPED;
729 pti->pt_flags &= ~PF_STOPPED;
731 pti->pt_send |= flush;
753 struct ptmx_ioctl *pti = pty_get_ioctl(dev, 0, NULL); local
757 if (pti == NULL) {
760 tp = pti->pt_tty;
805 struct ptmx_ioctl *pti = pty_get_ioctl(dev, 0, &driver); local
809 if (pti == NULL) {
812 tp = pti->pt_tty;
833 (((pti->pt_flags & PF_PKT) && pti->pt_send) ||
834 ((pti->pt_flags & PF_UCNTL) && pti->pt_ucntl))) {
838 selrecord(p, &pti->pt_selr, wql);
855 selrecord(p, &pti->pt_selw, wql);
879 struct ptmx_ioctl *pti = pty_get_ioctl(dev, 0, NULL); local
887 if (pti == NULL) {
890 tp = pti->pt_tty;
965 struct ptmx_ioctl *pti = pty_get_ioctl(dev, 0, &driver); local
970 if (pti == NULL || pti->pt_tty == NULL) {
978 tp = pti->pt_tty;
1004 if (pti->pt_flags & PF_PKT) {
1005 pti->pt_send |= TIOCPKT_IOCTL;
1011 (pti->pt_flags & PF_PKT)) {
1012 pti->pt_send |= TIOCPKT_IOCTL;
1030 if (pti->pt_flags & PF_UCNTL) {
1034 pti->pt_flags |= PF_PKT;
1036 pti->pt_flags &= ~PF_PKT;
1042 if (pti->pt_flags & PF_PKT) {
1046 pti->pt_flags |= PF_UCNTL;
1048 pti->pt_flags &= ~PF_UCNTL;
1093 error = _devfs_setattr(pti->pt_devhandle, 0620, kauth_getuid(), GID_TTY);
1125 pti->pt_flags |= PF_UNLOCKED;
1145 if (pti->pt_flags & PF_UCNTL && (cmd & ~0xff) == UIOCCMD(0)) {
1148 pti->pt_ucntl = (u_char)cmd;
1171 if ((tp->t_lflag & EXTPROC) && (pti->pt_flags & PF_PKT)) {
1186 pti->pt_send |= TIOCPKT_IOCTL;
1195 if (pti->pt_flags & PF_NOSTOP) {
1197 pti->pt_send &= ~TIOCPKT_NOSTOP;
1198 pti->pt_send |= TIOCPKT_DOSTOP;
1199 pti->pt_flags &= ~PF_NOSTOP;
1204 pti->pt_send &= ~TIOCPKT_DOSTOP;
1205 pti->pt_send |= TIOCPKT_NOSTOP;
1206 pti->pt_flags |= PF_NOSTOP;