Lines Matching refs:ptsp

294 	struct pt_ttys	*ptsp;
307 ptsp = ptms_minor2ptty(dminor);
309 if (ptsp == NULL) {
313 mutex_enter(&ptsp->pt_lock);
320 if (ptsp->pt_zoneid != getzoneid()) {
321 mutex_exit(&ptsp->pt_lock);
330 ASSERT(rqp->q_ptr == ptsp);
331 ASSERT(ptsp->pts_rdq == rqp);
332 mutex_exit(&ptsp->pt_lock);
337 DDBGP("ptsopen: p = %p\n", (uintptr_t)ptsp);
338 DDBG("ptsopen: state = %x\n", ptsp->pt_state);
341 ASSERT(ptsp->pt_minor == dminor);
343 if ((ptsp->pt_state & PTLOCK) || !(ptsp->pt_state & PTMOPEN)) {
344 mutex_exit(&ptsp->pt_lock);
352 if (ptsp->pt_state & PTSOPEN) {
353 ASSERT(rqp->q_ptr == ptsp);
354 ASSERT(ptsp->pts_rdq == rqp);
355 mutex_exit(&ptsp->pt_lock);
364 mutex_exit(&ptsp->pt_lock);
376 mutex_exit(&ptsp->pt_lock);
382 ptsp->pt_state |= PTSOPEN;
384 WR(rqp)->q_ptr = rqp->q_ptr = ptsp;
386 mutex_exit(&ptsp->pt_lock);
397 PT_ENTER_WRITE(ptsp);
398 ptsp->pts_rdq = rqp;
399 ASSERT(ptsp->pt_nullmsg == NULL);
400 ptsp->pt_nullmsg = mp;
401 PT_EXIT_WRITE(ptsp);
431 struct pt_ttys *ptsp;
447 ptsp = (struct pt_ttys *)rqp->q_ptr;
455 PT_ENTER_WRITE(ptsp);
456 mp = ptsp->pt_nullmsg;
457 ptsp->pt_nullmsg = NULL;
458 ptsp->pts_rdq = NULL;
459 PT_EXIT_WRITE(ptsp);
465 PT_ENTER_READ(ptsp);
467 if (ptsp->ptm_rdq) {
468 putnext(ptsp->ptm_rdq, bp);
482 if (ptsp->ptm_rdq) {
484 putnext(ptsp->ptm_rdq, mp);
486 qenable(WR(ptsp->ptm_rdq));
489 PT_EXIT_READ(ptsp);
496 ptms_close(ptsp, PTSOPEN | PTSTTY);
510 struct pt_ttys *ptsp;
517 ptsp = (struct pt_ttys *)qp->q_ptr;
518 PT_ENTER_READ(ptsp);
519 if (ptsp->ptm_rdq == NULL) {
532 PT_EXIT_READ(ptsp);
564 if (ptsp->ptm_rdq)
565 putnext(ptsp->ptm_rdq, mp);
579 if (ptsp->ptm_rdq)
580 putnext(ptsp->ptm_rdq, nmp);
604 if (ptsp->ptm_rdq)
605 putnext(ptsp->ptm_rdq, mp);
608 PT_EXIT_READ(ptsp);
627 if (ptsp->pt_state & PTSTTY) {
632 mutex_enter(&ptsp->pt_lock);
633 ptsp->pt_state |= PTSTTY;
634 mutex_exit(&ptsp->pt_lock);
639 PT_EXIT_READ(ptsp);
652 PT_EXIT_READ(ptsp);
665 struct pt_ttys *ptsp;
670 ptsp = (struct pt_ttys *)qp->q_ptr;
671 PT_ENTER_READ(ptsp);
672 if (ptsp->ptm_rdq == NULL) {
674 PT_EXIT_READ(ptsp);
677 qenable(WR(ptsp->ptm_rdq));
678 PT_EXIT_READ(ptsp);
691 struct pt_ttys *ptsp;
698 ptsp = (struct pt_ttys *)qp->q_ptr;
699 PT_ENTER_READ(ptsp);
700 if (ptsp->ptm_rdq == NULL) {
717 PT_EXIT_READ(ptsp);
720 ptm_rdq = ptsp->ptm_rdq;
745 PT_EXIT_READ(ptsp);