usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c
246
static int pty; /* side of pty that gets ioctls */
usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c
2780
pty = t;
usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c
2790
if (ioctl(pty, TIOCGETP, &b) == -1)
usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c
2793
if (ioctl(pty, TIOCSETN, &b) == -1)
usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c
3521
if (ioctl(pty, TIOCGLTC, &tmpltc) == -1)
usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c
3547
if (ioctl(pty, TIOCGETP, &b) == -1)
usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c
4004
(void) ioctl(pty, TIOCSWINSZ, &ws);
usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c
4201
if (tcgetattr(pty, &tios) < 0)
usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c
4229
if (tcsetattr(pty, TCSANOW, &tios) < 0)
usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c
4245
if (ioctl(pty, TIOCGETP, &b) == -1)
usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c
4251
*pfrontp++ = ioctl(pty, TIOCGETC, &tchars) < 0 ?
usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c
4267
(void) ioctl(pty, TIOCGETP, &b);
usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c
4272
*pfrontp++ = ioctl(pty, TIOCGETC, &tchars) < 0 ?
usr/src/cmd/lp/lib/filters/dumpfilters.c
54
register TYPE *pty;
usr/src/cmd/lp/lib/filters/dumpfilters.c
87
pty = pf->printer_types;
usr/src/cmd/lp/lib/filters/dumpfilters.c
90
pty = pf->input_types;
usr/src/cmd/lp/lib/filters/dumpfilters.c
93
pty = pf->output_types;
usr/src/cmd/lp/lib/filters/dumpfilters.c
96
if (pty) {
usr/src/cmd/lp/lib/filters/dumpfilters.c
97
for (; pty->name; pty++) {
usr/src/cmd/lp/lib/filters/dumpfilters.c
99
pty->name);
usr/src/cmd/svc/svccfg/svccfg_libscf.c
1167
scf_type_t pty;
usr/src/cmd/svc/svccfg/svccfg_libscf.c
1169
if (scf_property_type(prop, &pty) != SCF_SUCCESS)
usr/src/cmd/svc/svccfg/svccfg_libscf.c
1172
if (ty == pty)
usr/src/lib/libutempter/common/utempter.c
117
addToUtmp(const char *pty __unused, const char *host, int fd)
usr/src/lib/libutempter/common/utempter.c
129
removeLineFromUtmp(const char *pty __unused, int fd)
usr/src/uts/common/io/tty_pts.c
1003
cv_broadcast(&pty->pt_cv_writeq);
usr/src/uts/common/io/tty_pts.c
1004
if (pty->pt_flags & PF_ASYNC)
usr/src/uts/common/io/tty_pts.c
1005
gsignal(pty->pt_pgrp, SIGIO);
usr/src/uts/common/io/tty_pts.c
1014
cv_broadcast(&pty->pt_cv_readq);
usr/src/uts/common/io/tty_pts.c
1015
if (pty->pt_flags & PF_ASYNC)
usr/src/uts/common/io/tty_pts.c
1016
gsignal(pty->pt_pgrp, SIGIO);
usr/src/uts/common/io/tty_pts.c
118
static void ptslioctl(struct pty *, queue_t *, mblk_t *);
usr/src/uts/common/io/tty_pts.c
119
static void pt_sendstop(struct pty *);
usr/src/uts/common/io/tty_pts.c
120
static void ptcpollwakeup(struct pty *, int);
usr/src/uts/common/io/tty_pts.c
237
struct pty *pty;
usr/src/uts/common/io/tty_pts.c
243
pty = &pty_softc[unit];
usr/src/uts/common/io/tty_pts.c
245
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
251
if (pty->pt_ttycommon.t_writeq == NULL) {
usr/src/uts/common/io/tty_pts.c
252
pty->pt_ttycommon.t_iflag = 0;
usr/src/uts/common/io/tty_pts.c
253
pty->pt_ttycommon.t_cflag = (B38400 << IBSHIFT)|B38400|IFLAGS;
usr/src/uts/common/io/tty_pts.c
254
pty->pt_ttycommon.t_iocpending = NULL;
usr/src/uts/common/io/tty_pts.c
255
pty->pt_wbufcid = 0;
usr/src/uts/common/io/tty_pts.c
256
pty->pt_ttycommon.t_size.ws_row = 0;
usr/src/uts/common/io/tty_pts.c
257
pty->pt_ttycommon.t_size.ws_col = 0;
usr/src/uts/common/io/tty_pts.c
258
pty->pt_ttycommon.t_size.ws_xpixel = 0;
usr/src/uts/common/io/tty_pts.c
259
pty->pt_ttycommon.t_size.ws_ypixel = 0;
usr/src/uts/common/io/tty_pts.c
260
} else if ((pty->pt_ttycommon.t_flags & TS_XCLUDE) &&
usr/src/uts/common/io/tty_pts.c
262
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
266
!(pty->pt_ttycommon.t_cflag & CLOCAL)) {
usr/src/uts/common/io/tty_pts.c
267
if (!(pty->pt_flags & PF_CARR_ON)) {
usr/src/uts/common/io/tty_pts.c
268
pty->pt_flags |= PF_WOPEN;
usr/src/uts/common/io/tty_pts.c
269
if (!cv_wait_sig(&pty->pt_cv_flags, &pty->ptc_lock)) {
usr/src/uts/common/io/tty_pts.c
270
pty->pt_flags &= ~PF_WOPEN;
usr/src/uts/common/io/tty_pts.c
271
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
278
pty->pt_sdev = dev;
usr/src/uts/common/io/tty_pts.c
279
q->q_ptr = WR(q)->q_ptr = pty;
usr/src/uts/common/io/tty_pts.c
280
pty->pt_flags &= ~PF_SUBSIDGONE;
usr/src/uts/common/io/tty_pts.c
281
pty->pt_ttycommon.t_readq = pty->pt_ttycommon.t_writeq = NULL;
usr/src/uts/common/io/tty_pts.c
289
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
297
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
302
pty->pt_vnode = strq2vp(q);
usr/src/uts/common/io/tty_pts.c
303
VN_RELE(pty->pt_vnode);
usr/src/uts/common/io/tty_pts.c
304
pty->pt_ttycommon.t_readq = q;
usr/src/uts/common/io/tty_pts.c
305
pty->pt_ttycommon.t_writeq = WR(q);
usr/src/uts/common/io/tty_pts.c
307
if (pty->pt_flags & PF_CARR_ON)
usr/src/uts/common/io/tty_pts.c
308
cv_broadcast(&pty->pt_cv_readq);
usr/src/uts/common/io/tty_pts.c
309
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
317
struct pty *pty;
usr/src/uts/common/io/tty_pts.c
325
if ((pty = (struct pty *)q->q_ptr) == NULL)
usr/src/uts/common/io/tty_pts.c
334
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
335
pty->pt_ttycommon.t_readq = NULL;
usr/src/uts/common/io/tty_pts.c
336
pty->pt_ttycommon.t_writeq = NULL;
usr/src/uts/common/io/tty_pts.c
337
while (pty->pt_flags & PF_IOCTL) {
usr/src/uts/common/io/tty_pts.c
338
pty->pt_flags |= PF_WAIT;
usr/src/uts/common/io/tty_pts.c
339
cv_wait(&pty->pt_cv_flags, &pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
341
pty->pt_vnode = NULL;
usr/src/uts/common/io/tty_pts.c
342
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
346
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
351
ttycommon_close(&pty->pt_ttycommon);
usr/src/uts/common/io/tty_pts.c
356
if (pty->pt_wbufcid) {
usr/src/uts/common/io/tty_pts.c
357
pt_wbufcid = pty->pt_wbufcid;
usr/src/uts/common/io/tty_pts.c
358
pty->pt_wbufcid = 0;
usr/src/uts/common/io/tty_pts.c
364
pty->pt_flags &= ~(PF_WOPEN|PF_STOPPED|PF_NOSTOP);
usr/src/uts/common/io/tty_pts.c
365
if (pty->pt_flags & PF_CARR_ON) {
usr/src/uts/common/io/tty_pts.c
366
pty->pt_flags |= PF_SUBSIDGONE; /* let the controller know */
usr/src/uts/common/io/tty_pts.c
367
ptcpollwakeup(pty, 0); /* wake up readers/selectors */
usr/src/uts/common/io/tty_pts.c
368
ptcpollwakeup(pty, FWRITE); /* wake up writers/selectors */
usr/src/uts/common/io/tty_pts.c
369
cv_broadcast(&pty->pt_cv_flags);
usr/src/uts/common/io/tty_pts.c
371
pty->pt_sdev = 0;
usr/src/uts/common/io/tty_pts.c
373
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
390
struct pty *pty;
usr/src/uts/common/io/tty_pts.c
393
pty = (struct pty *)q->q_ptr;
usr/src/uts/common/io/tty_pts.c
395
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
400
if (!(pty->pt_flags & PF_STOPPED)) {
usr/src/uts/common/io/tty_pts.c
401
pty->pt_flags |= PF_STOPPED;
usr/src/uts/common/io/tty_pts.c
402
pty->pt_send |= TIOCPKT_STOP;
usr/src/uts/common/io/tty_pts.c
403
ptcpollwakeup(pty, 0);
usr/src/uts/common/io/tty_pts.c
409
if (pty->pt_flags & PF_STOPPED) {
usr/src/uts/common/io/tty_pts.c
410
pty->pt_flags &= ~PF_STOPPED;
usr/src/uts/common/io/tty_pts.c
411
pty->pt_send = TIOCPKT_START;
usr/src/uts/common/io/tty_pts.c
412
ptcpollwakeup(pty, 0);
usr/src/uts/common/io/tty_pts.c
414
ptcpollwakeup(pty, FREAD); /* permit controller to read */
usr/src/uts/common/io/tty_pts.c
419
ptslioctl(pty, q, mp);
usr/src/uts/common/io/tty_pts.c
429
if (!(pty->pt_send & TIOCPKT_FLUSHWRITE)) {
usr/src/uts/common/io/tty_pts.c
430
pty->pt_send |= TIOCPKT_FLUSHWRITE;
usr/src/uts/common/io/tty_pts.c
431
ptcpollwakeup(pty, 0);
usr/src/uts/common/io/tty_pts.c
445
if (!(pty->pt_send & TIOCPKT_FLUSHREAD)) {
usr/src/uts/common/io/tty_pts.c
446
pty->pt_send |= TIOCPKT_FLUSHREAD;
usr/src/uts/common/io/tty_pts.c
447
ptcpollwakeup(pty, 0);
usr/src/uts/common/io/tty_pts.c
450
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
462
if (pty->pt_flags & PF_CARR_ON) {
usr/src/uts/common/io/tty_pts.c
468
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
475
ptcpollwakeup(pty, FREAD); /* soup's on! */
usr/src/uts/common/io/tty_pts.c
488
(pty->pt_flags & PF_REMOTE) ?
usr/src/uts/common/io/tty_pts.c
502
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
513
struct pty *pty = arg;
usr/src/uts/common/io/tty_pts.c
517
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
521
if (pty->pt_wbufcid == 0) {
usr/src/uts/common/io/tty_pts.c
522
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
526
pty->pt_wbufcid = 0;
usr/src/uts/common/io/tty_pts.c
527
if ((q = pty->pt_ttycommon.t_writeq) == NULL) {
usr/src/uts/common/io/tty_pts.c
528
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
531
if ((mp = pty->pt_ttycommon.t_iocpending) != NULL) {
usr/src/uts/common/io/tty_pts.c
533
pty->pt_ttycommon.t_iocpending = NULL;
usr/src/uts/common/io/tty_pts.c
534
ptslioctl(pty, q, mp);
usr/src/uts/common/io/tty_pts.c
536
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
544
ptslioctl(struct pty *pty, queue_t *q, mblk_t *mp)
usr/src/uts/common/io/tty_pts.c
55
extern struct pty *pty_softc;
usr/src/uts/common/io/tty_pts.c
551
ASSERT(MUTEX_HELD(&pty->ptc_lock));
usr/src/uts/common/io/tty_pts.c
575
if (!(pty->pt_flags & PF_REMOTE)) {
usr/src/uts/common/io/tty_pts.c
576
if (!canput(pty->pt_ttycommon.t_readq)) {
usr/src/uts/common/io/tty_pts.c
577
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
578
ttycommon_qfull(&pty->pt_ttycommon, q);
usr/src/uts/common/io/tty_pts.c
579
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
585
pty->pt_ttycommon.t_readq, bp);
usr/src/uts/common/io/tty_pts.c
587
if (pty->pt_flags & PF_UCNTL) {
usr/src/uts/common/io/tty_pts.c
592
if (pty->pt_stuffqfirst != NULL) {
usr/src/uts/common/io/tty_pts.c
593
pty->pt_stuffqlast->b_next = bp;
usr/src/uts/common/io/tty_pts.c
594
bp->b_prev = pty->pt_stuffqlast;
usr/src/uts/common/io/tty_pts.c
596
pty->pt_stuffqfirst = bp;
usr/src/uts/common/io/tty_pts.c
600
pty->pt_stuffqlast = bp;
usr/src/uts/common/io/tty_pts.c
601
pty->pt_stuffqlen++;
usr/src/uts/common/io/tty_pts.c
602
ptcpollwakeup(pty, 0);
usr/src/uts/common/io/tty_pts.c
619
tty_common_t *tc = &pty->pt_ttycommon;
usr/src/uts/common/io/tty_pts.c
644
tty_common_t *tc = &pty->pt_ttycommon;
usr/src/uts/common/io/tty_pts.c
650
if (pty->pt_wbufcid) {
usr/src/uts/common/io/tty_pts.c
651
if (pty->pt_ttycommon.t_iocpending)
usr/src/uts/common/io/tty_pts.c
652
freemsg(pty->pt_ttycommon.t_iocpending);
usr/src/uts/common/io/tty_pts.c
653
pty->pt_ttycommon.t_iocpending = mp;
usr/src/uts/common/io/tty_pts.c
656
pty->pt_wbufcid = bufcall(sizeof (struct ttysize),
usr/src/uts/common/io/tty_pts.c
657
BPRI_HI, ptslreioctl, pty);
usr/src/uts/common/io/tty_pts.c
658
if (pty->pt_wbufcid == 0) {
usr/src/uts/common/io/tty_pts.c
662
pty->pt_ttycommon.t_iocpending = mp;
usr/src/uts/common/io/tty_pts.c
686
tty_common_t *tc = &pty->pt_ttycommon;
usr/src/uts/common/io/tty_pts.c
696
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
698
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
715
tty_common_t *tc = &pty->pt_ttycommon;
usr/src/uts/common/io/tty_pts.c
725
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
727
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
742
tty_common_t *tc = &pty->pt_ttycommon;
usr/src/uts/common/io/tty_pts.c
757
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
759
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
803
ttycommon_ioctl(&pty->pt_ttycommon, q, mp, &error)) != 0) {
usr/src/uts/common/io/tty_pts.c
804
if (pty->pt_wbufcid) {
usr/src/uts/common/io/tty_pts.c
805
if (pty->pt_ttycommon.t_iocpending)
usr/src/uts/common/io/tty_pts.c
806
freemsg(pty->pt_ttycommon.t_iocpending);
usr/src/uts/common/io/tty_pts.c
807
pty->pt_ttycommon.t_iocpending = mp;
usr/src/uts/common/io/tty_pts.c
810
pty->pt_wbufcid = bufcall(datasize, BPRI_HI, ptslreioctl, pty);
usr/src/uts/common/io/tty_pts.c
811
if (pty->pt_wbufcid == 0) {
usr/src/uts/common/io/tty_pts.c
815
pty->pt_ttycommon.t_iocpending = mp;
usr/src/uts/common/io/tty_pts.c
834
if (!(pty->pt_send & TIOCPKT_FLUSHREAD)) {
usr/src/uts/common/io/tty_pts.c
835
pty->pt_send |= TIOCPKT_FLUSHREAD;
usr/src/uts/common/io/tty_pts.c
836
ptcpollwakeup(pty, 0);
usr/src/uts/common/io/tty_pts.c
843
pt_sendstop(pty);
usr/src/uts/common/io/tty_pts.c
849
pt_sendstop(pty);
usr/src/uts/common/io/tty_pts.c
854
if (pty->pt_flags & PF_43UCNTL) {
usr/src/uts/common/io/tty_pts.c
858
pty->pt_ucntl = (uchar_t)cmd & 0xff;
usr/src/uts/common/io/tty_pts.c
859
ptcpollwakeup(pty, FREAD);
usr/src/uts/common/io/tty_pts.c
867
if ((pty->pt_flags & PF_UCNTL) &&
usr/src/uts/common/io/tty_pts.c
870
pty->pt_ucntl = (uchar_t)cmd & 0xff;
usr/src/uts/common/io/tty_pts.c
871
ptcpollwakeup(pty, FREAD);
usr/src/uts/common/io/tty_pts.c
884
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
886
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
897
struct pty *pty = (struct pty *)q->q_ptr;
usr/src/uts/common/io/tty_pts.c
904
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
921
ptcpollwakeup((struct pty *)q->q_ptr, FWRITE);
usr/src/uts/common/io/tty_pts.c
923
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pts.c
936
pt_sendstop(struct pty *pty)
usr/src/uts/common/io/tty_pts.c
940
ASSERT(MUTEX_HELD(&pty->ptc_lock));
usr/src/uts/common/io/tty_pts.c
942
if ((pty->pt_ttycommon.t_cflag&CBAUD) == 0) {
usr/src/uts/common/io/tty_pts.c
943
if (pty->pt_flags & PF_CARR_ON) {
usr/src/uts/common/io/tty_pts.c
948
pty->pt_flags |= PF_SUBSIDGONE;
usr/src/uts/common/io/tty_pts.c
949
ptcpollwakeup(pty, 0);
usr/src/uts/common/io/tty_pts.c
950
ptcpollwakeup(pty, FWRITE);
usr/src/uts/common/io/tty_pts.c
954
stop = (pty->pt_ttycommon.t_iflag & IXON) &&
usr/src/uts/common/io/tty_pts.c
955
pty->pt_ttycommon.t_stopc == CTRL('s') &&
usr/src/uts/common/io/tty_pts.c
956
pty->pt_ttycommon.t_startc == CTRL('q');
usr/src/uts/common/io/tty_pts.c
958
if (pty->pt_flags & PF_NOSTOP) {
usr/src/uts/common/io/tty_pts.c
960
pty->pt_send &= ~TIOCPKT_NOSTOP;
usr/src/uts/common/io/tty_pts.c
961
pty->pt_send |= TIOCPKT_DOSTOP;
usr/src/uts/common/io/tty_pts.c
962
pty->pt_flags &= ~PF_NOSTOP;
usr/src/uts/common/io/tty_pts.c
963
ptcpollwakeup(pty, 0);
usr/src/uts/common/io/tty_pts.c
967
pty->pt_send &= ~TIOCPKT_DOSTOP;
usr/src/uts/common/io/tty_pts.c
968
pty->pt_send |= TIOCPKT_NOSTOP;
usr/src/uts/common/io/tty_pts.c
969
pty->pt_flags |= PF_NOSTOP;
usr/src/uts/common/io/tty_pts.c
970
ptcpollwakeup(pty, 0);
usr/src/uts/common/io/tty_pts.c
983
ptcpollwakeup(struct pty *pty, int flag)
usr/src/uts/common/io/tty_pts.c
985
ASSERT(MUTEX_HELD(&pty->ptc_lock));
usr/src/uts/common/io/tty_pts.c
994
if (pty->pt_flags & PF_ASYNC)
usr/src/uts/common/io/tty_pts.c
995
gsignal(pty->pt_pgrp, SIGURG);
usr/src/uts/common/io/tty_pty.c
1005
if (pty->pt_flags & (PF_PKT|PF_UCNTL) && pty->pt_send) {
usr/src/uts/common/io/tty_pty.c
1012
if ((pty->pt_flags & PF_UCNTL) &&
usr/src/uts/common/io/tty_pty.c
1013
(pty->pt_ucntl || pty->pt_stuffqfirst != NULL)) {
usr/src/uts/common/io/tty_pty.c
1020
if ((pty->pt_flags & PF_43UCNTL) && pty->pt_ucntl) {
usr/src/uts/common/io/tty_pty.c
1026
if ((q = pty->pt_ttycommon.t_readq) != NULL &&
usr/src/uts/common/io/tty_pty.c
1037
if (((pty->pt_flags & (PF_PKT|PF_UCNTL)) && pty->pt_send) ||
usr/src/uts/common/io/tty_pty.c
1038
((pty->pt_flags & PF_UCNTL) &&
usr/src/uts/common/io/tty_pty.c
1039
(pty->pt_ucntl || pty->pt_stuffqfirst != NULL))) {
usr/src/uts/common/io/tty_pty.c
1042
if ((pty->pt_flags & PF_43UCNTL) && pty->pt_ucntl) {
usr/src/uts/common/io/tty_pty.c
1056
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
1077
makemsg(ssize_t count, struct uio *uiop, struct pty *pty, mblk_t **mpp)
usr/src/uts/common/io/tty_pty.c
1083
ASSERT(MUTEX_HELD(&pty->ptc_lock));
usr/src/uts/common/io/tty_pty.c
1094
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
1096
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
248
struct pty *pty;
usr/src/uts/common/io/tty_pty.c
254
pty = &pty_softc[getminor(dev)];
usr/src/uts/common/io/tty_pty.c
255
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
256
if (pty->pt_flags & PF_CARR_ON) {
usr/src/uts/common/io/tty_pty.c
257
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
261
if (pty->pt_flags & PF_WOPEN) {
usr/src/uts/common/io/tty_pty.c
262
pty->pt_flags &= ~PF_WOPEN;
usr/src/uts/common/io/tty_pty.c
263
cv_broadcast(&pty->pt_cv_flags);
usr/src/uts/common/io/tty_pty.c
266
if ((q = pty->pt_ttycommon.t_readq) != NULL) {
usr/src/uts/common/io/tty_pty.c
274
pty->pt_flags |= PF_CARR_ON;
usr/src/uts/common/io/tty_pty.c
275
pty->pt_send = 0;
usr/src/uts/common/io/tty_pty.c
276
pty->pt_ucntl = 0;
usr/src/uts/common/io/tty_pty.c
278
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
285
struct pty *pty;
usr/src/uts/common/io/tty_pty.c
289
pty = &pty_softc[getminor(dev)];
usr/src/uts/common/io/tty_pty.c
291
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
292
if ((q = pty->pt_ttycommon.t_readq) != NULL) {
usr/src/uts/common/io/tty_pty.c
305
pty->pt_flags &= (PF_WOPEN|PF_STOPPED|PF_NOSTOP);
usr/src/uts/common/io/tty_pty.c
306
while ((bp = pty->pt_stuffqfirst) != NULL) {
usr/src/uts/common/io/tty_pty.c
307
if ((pty->pt_stuffqfirst = bp->b_next) == NULL)
usr/src/uts/common/io/tty_pty.c
308
pty->pt_stuffqlast = NULL;
usr/src/uts/common/io/tty_pty.c
310
pty->pt_stuffqfirst->b_prev = NULL;
usr/src/uts/common/io/tty_pty.c
311
pty->pt_stuffqlen--;
usr/src/uts/common/io/tty_pty.c
315
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
322
struct pty *pty = &pty_softc[getminor(dev)];
usr/src/uts/common/io/tty_pty.c
332
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
335
while (pty->pt_flags & PF_READ) {
usr/src/uts/common/io/tty_pty.c
336
pty->pt_flags |= PF_WREAD;
usr/src/uts/common/io/tty_pty.c
337
cv_wait(&pty->pt_cv_flags, &pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
339
pty->pt_flags |= PF_READ;
usr/src/uts/common/io/tty_pty.c
344
while (pty->pt_flags&(PF_PKT|PF_UCNTL) && pty->pt_send) {
usr/src/uts/common/io/tty_pty.c
345
tmp = pty->pt_send;
usr/src/uts/common/io/tty_pty.c
346
pty->pt_send = 0;
usr/src/uts/common/io/tty_pty.c
347
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
350
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
352
pty->pt_send |= tmp;
usr/src/uts/common/io/tty_pty.c
355
if (pty->pt_send == 0)
usr/src/uts/common/io/tty_pty.c
363
while ((pty->pt_flags & (PF_UCNTL|PF_43UCNTL)) &&
usr/src/uts/common/io/tty_pty.c
364
pty->pt_ucntl) {
usr/src/uts/common/io/tty_pty.c
365
tmp = pty->pt_ucntl;
usr/src/uts/common/io/tty_pty.c
366
pty->pt_ucntl = 0;
usr/src/uts/common/io/tty_pty.c
367
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
370
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
372
if (pty->pt_ucntl == 0)
usr/src/uts/common/io/tty_pty.c
373
pty->pt_ucntl = tmp;
usr/src/uts/common/io/tty_pty.c
376
if (pty->pt_ucntl == 0)
usr/src/uts/common/io/tty_pty.c
383
if ((q = pty->pt_ttycommon.t_writeq) != NULL &&
usr/src/uts/common/io/tty_pty.c
385
!(pty->pt_flags & PF_STOPPED)) {
usr/src/uts/common/io/tty_pty.c
386
if (pty->pt_flags & (PF_PKT|PF_UCNTL|PF_43UCNTL)) {
usr/src/uts/common/io/tty_pty.c
392
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
395
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
398
if ((q = pty->pt_ttycommon.t_writeq) == NULL)
usr/src/uts/common/io/tty_pty.c
414
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
418
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
423
q = pty->pt_ttycommon.t_writeq;
usr/src/uts/common/io/tty_pty.c
448
if (pty->pt_flags&PF_UCNTL && pty->pt_stuffqfirst != NULL) {
usr/src/uts/common/io/tty_pty.c
449
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
451
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
453
(bp = pty->pt_stuffqfirst) != NULL &&
usr/src/uts/common/io/tty_pty.c
455
pty->pt_stuffqlen--;
usr/src/uts/common/io/tty_pty.c
456
if ((pty->pt_stuffqfirst = bp->b_next) == NULL)
usr/src/uts/common/io/tty_pty.c
457
pty->pt_stuffqlast = NULL;
usr/src/uts/common/io/tty_pty.c
459
pty->pt_stuffqfirst->b_prev = NULL;
usr/src/uts/common/io/tty_pty.c
460
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
464
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
479
if (pty->pt_flags & PF_SUBSIDGONE) {
usr/src/uts/common/io/tty_pty.c
487
if (pty->pt_flags & PF_NBIO) {
usr/src/uts/common/io/tty_pty.c
494
if (pty->pt_flags & PF_WREAD)
usr/src/uts/common/io/tty_pty.c
495
cv_broadcast(&pty->pt_cv_flags);
usr/src/uts/common/io/tty_pty.c
497
pty->pt_flags &= ~(PF_READ | PF_WREAD);
usr/src/uts/common/io/tty_pty.c
500
if (!cv_wait_sig(&pty->pt_cv_writeq, &pty->ptc_lock)) {
usr/src/uts/common/io/tty_pty.c
501
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
507
if (pty->pt_flags & PF_WREAD)
usr/src/uts/common/io/tty_pty.c
508
cv_broadcast(&pty->pt_cv_flags);
usr/src/uts/common/io/tty_pty.c
51
extern struct pty *pty_softc;
usr/src/uts/common/io/tty_pty.c
510
pty->pt_flags &= ~(PF_READ | PF_WREAD);
usr/src/uts/common/io/tty_pty.c
512
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
519
struct pty *pty = &pty_softc[getminor(dev)];
usr/src/uts/common/io/tty_pty.c
529
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
532
while (pty->pt_flags & PF_WRITE) {
usr/src/uts/common/io/tty_pty.c
533
pty->pt_flags |= PF_WWRITE;
usr/src/uts/common/io/tty_pty.c
534
cv_wait(&pty->pt_cv_flags, &pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
537
pty->pt_flags |= PF_WRITE;
usr/src/uts/common/io/tty_pty.c
539
if ((q = pty->pt_ttycommon.t_readq) == NULL) {
usr/src/uts/common/io/tty_pty.c
544
if (pty->pt_flags & PF_SUBSIDGONE) {
usr/src/uts/common/io/tty_pty.c
552
if (pty->pt_flags & PF_NBIO) {
usr/src/uts/common/io/tty_pty.c
559
if (pty->pt_flags & PF_WWRITE)
usr/src/uts/common/io/tty_pty.c
560
cv_broadcast(&pty->pt_cv_flags);
usr/src/uts/common/io/tty_pty.c
562
pty->pt_flags &= ~(PF_WRITE | PF_WWRITE);
usr/src/uts/common/io/tty_pty.c
564
if (!cv_wait_sig(&pty->pt_cv_readq, &pty->ptc_lock)) {
usr/src/uts/common/io/tty_pty.c
565
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
576
if ((pty->pt_flags & PF_REMOTE) || uio->uio_resid > 0) {
usr/src/uts/common/io/tty_pty.c
582
if (pty->pt_flags & PF_SUBSIDGONE) {
usr/src/uts/common/io/tty_pty.c
591
if (pty->pt_flags & PF_NBIO) {
usr/src/uts/common/io/tty_pty.c
599
if (pty->pt_flags & PF_WWRITE)
usr/src/uts/common/io/tty_pty.c
600
cv_broadcast(&pty->pt_cv_flags);
usr/src/uts/common/io/tty_pty.c
602
pty->pt_flags &= ~(PF_WRITE | PF_WWRITE);
usr/src/uts/common/io/tty_pty.c
604
if (!cv_wait_sig(&pty->pt_cv_readq,
usr/src/uts/common/io/tty_pty.c
605
&pty->ptc_lock)) {
usr/src/uts/common/io/tty_pty.c
606
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
610
while (pty->pt_flags & PF_WRITE) {
usr/src/uts/common/io/tty_pty.c
611
pty->pt_flags |= PF_WWRITE;
usr/src/uts/common/io/tty_pty.c
612
cv_wait(&pty->pt_cv_flags,
usr/src/uts/common/io/tty_pty.c
613
&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
616
pty->pt_flags |= PF_WRITE;
usr/src/uts/common/io/tty_pty.c
619
if ((pty->pt_flags & PF_NBIO) &&
usr/src/uts/common/io/tty_pty.c
625
error = makemsg(uio->uio_resid, uio, pty, &mp);
usr/src/uts/common/io/tty_pty.c
637
if (pty->pt_flags & PF_NBIO) {
usr/src/uts/common/io/tty_pty.c
654
if ((q = pty->pt_ttycommon.t_readq) == NULL) {
usr/src/uts/common/io/tty_pty.c
666
if (pty->pt_flags & PF_WWRITE)
usr/src/uts/common/io/tty_pty.c
667
cv_broadcast(&pty->pt_cv_flags);
usr/src/uts/common/io/tty_pty.c
669
pty->pt_flags &= ~(PF_WRITE | PF_WWRITE);
usr/src/uts/common/io/tty_pty.c
671
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
68
struct pty *pty, mblk_t **mpp);
usr/src/uts/common/io/tty_pty.c
687
struct pty *pty = &pty_softc[getminor(dev)];
usr/src/uts/common/io/tty_pty.c
698
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
700
if (pty->pt_flags & (PF_UCNTL|PF_43UCNTL)) {
usr/src/uts/common/io/tty_pty.c
701
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
704
pty->pt_flags |= PF_PKT;
usr/src/uts/common/io/tty_pty.c
706
pty->pt_flags &= ~PF_PKT;
usr/src/uts/common/io/tty_pty.c
707
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
712
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
714
if (pty->pt_flags & (PF_PKT|PF_UCNTL)) {
usr/src/uts/common/io/tty_pty.c
715
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
718
pty->pt_flags |= PF_43UCNTL;
usr/src/uts/common/io/tty_pty.c
720
pty->pt_flags &= ~PF_43UCNTL;
usr/src/uts/common/io/tty_pty.c
721
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
726
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
728
if (pty->pt_flags & PF_PKT) {
usr/src/uts/common/io/tty_pty.c
729
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
732
pty->pt_flags |= PF_UCNTL;
usr/src/uts/common/io/tty_pty.c
734
pty->pt_flags &= ~PF_UCNTL;
usr/src/uts/common/io/tty_pty.c
735
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
740
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
742
if ((q = pty->pt_ttycommon.t_readq) != NULL)
usr/src/uts/common/io/tty_pty.c
744
pty->pt_flags |= PF_REMOTE;
usr/src/uts/common/io/tty_pty.c
746
if ((q = pty->pt_ttycommon.t_readq) != NULL)
usr/src/uts/common/io/tty_pty.c
748
pty->pt_flags &= ~PF_REMOTE;
usr/src/uts/common/io/tty_pty.c
750
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
759
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
760
if ((q = pty->pt_ttycommon.t_readq) != NULL)
usr/src/uts/common/io/tty_pty.c
762
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
767
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
769
pty->pt_flags |= PF_NBIO;
usr/src/uts/common/io/tty_pty.c
771
pty->pt_flags &= ~PF_NBIO;
usr/src/uts/common/io/tty_pty.c
772
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
777
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
779
pty->pt_flags |= PF_ASYNC;
usr/src/uts/common/io/tty_pty.c
781
pty->pt_flags &= ~PF_ASYNC;
usr/src/uts/common/io/tty_pty.c
782
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
790
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
791
d_arg = -pty->pt_pgrp;
usr/src/uts/common/io/tty_pty.c
792
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
798
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
799
pty->pt_pgrp = (short)(-d_arg);
usr/src/uts/common/io/tty_pty.c
800
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
812
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
813
if (pty->pt_flags&(PF_PKT|PF_UCNTL) && pty->pt_send)
usr/src/uts/common/io/tty_pty.c
815
else if ((pty->pt_flags & (PF_UCNTL|PF_43UCNTL)) &&
usr/src/uts/common/io/tty_pty.c
816
pty->pt_ucntl)
usr/src/uts/common/io/tty_pty.c
818
else if ((q = pty->pt_ttycommon.t_writeq) != NULL &&
usr/src/uts/common/io/tty_pty.c
819
q->q_first != NULL && !(pty->pt_flags & PF_STOPPED)) {
usr/src/uts/common/io/tty_pty.c
825
} else if ((pty->pt_flags & PF_UCNTL) &&
usr/src/uts/common/io/tty_pty.c
826
pty->pt_stuffqfirst != NULL) {
usr/src/uts/common/io/tty_pty.c
830
count = pty->pt_stuffqlen + 1;
usr/src/uts/common/io/tty_pty.c
838
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
860
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
864
if (bcmp(&pty->pt_ttycommon.t_size,
usr/src/uts/common/io/tty_pty.c
866
pty->pt_ttycommon.t_size = win_arg;
usr/src/uts/common/io/tty_pty.c
867
if ((q = pty->pt_ttycommon.t_readq) != NULL)
usr/src/uts/common/io/tty_pty.c
870
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
879
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
880
pty->pt_ttycommon.t_size.ws_row = (ushort_t)tty_arg.ts_lines;
usr/src/uts/common/io/tty_pty.c
881
pty->pt_ttycommon.t_size.ws_col = (ushort_t)tty_arg.ts_cols;
usr/src/uts/common/io/tty_pty.c
882
pty->pt_ttycommon.t_size.ws_xpixel = 0;
usr/src/uts/common/io/tty_pty.c
883
pty->pt_ttycommon.t_size.ws_ypixel = 0;
usr/src/uts/common/io/tty_pty.c
884
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
888
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
889
win_arg = pty->pt_ttycommon.t_size;
usr/src/uts/common/io/tty_pty.c
890
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
897
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
898
tty_arg.ts_lines = pty->pt_ttycommon.t_size.ws_row;
usr/src/uts/common/io/tty_pty.c
899
tty_arg.ts_cols = pty->pt_ttycommon.t_size.ws_col;
usr/src/uts/common/io/tty_pty.c
900
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
942
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
943
if (pty->pt_vnode == NULL) {
usr/src/uts/common/io/tty_pty.c
944
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
947
pty->pt_flags |= PF_IOCTL;
usr/src/uts/common/io/tty_pty.c
948
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
949
err = strioctl(pty->pt_vnode, cmd, data, flag,
usr/src/uts/common/io/tty_pty.c
951
mutex_enter(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
952
if (pty->pt_flags & PF_WAIT)
usr/src/uts/common/io/tty_pty.c
953
cv_signal(&pty->pt_cv_flags);
usr/src/uts/common/io/tty_pty.c
954
pty->pt_flags &= ~(PF_IOCTL|PF_WAIT);
usr/src/uts/common/io/tty_pty.c
955
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
970
struct pty *pty = &pty_softc[getminor(dev)];
usr/src/uts/common/io/tty_pty.c
975
if (polllock(php, &pty->ptc_lock) != 0) {
usr/src/uts/common/io/tty_pty.c
980
ASSERT(MUTEX_HELD(&pty->ptc_lock));
usr/src/uts/common/io/tty_pty.c
983
if (pty->pt_flags & PF_SUBSIDGONE) {
usr/src/uts/common/io/tty_pty.c
988
mutex_exit(&pty->ptc_lock);
usr/src/uts/common/io/tty_pty.c
997
if ((q = pty->pt_ttycommon.t_writeq) != NULL &&
usr/src/uts/common/io/tty_pty.c
998
q->q_first != NULL && !(pty->pt_flags & PF_STOPPED)) {
usr/src/uts/common/io/tty_ptyconf.c
50
struct pty *pty_softc;
usr/src/uts/common/io/tty_ptyconf.c
60
pty_softc = (struct pty *)
usr/src/uts/common/io/tty_ptyconf.c
61
kmem_zalloc(npty * sizeof (struct pty), KM_SLEEP);
usr/src/uts/common/sys/ptyvar.h
140
extern struct pty *pty_softc;