Lines Matching refs:mp
271 ptemrput(queue_t *q, mblk_t *mp) in ptemrput() argument
277 switch (mp->b_datap->db_type) { in ptemrput()
280 freemsg(mp); in ptemrput()
284 iocp = (struct iocblk *)mp->b_rptr; in ptemrput()
295 error = miocpullup(mp, sizeof (int)); in ptemrput()
297 miocnak(q, mp, 0, error); in ptemrput()
300 if (!(*(int *)mp->b_cont->b_rptr)) { in ptemrput()
305 miocnak(q, mp, 0, EAGAIN); in ptemrput()
312 mioc2ack(mp, NULL, 0, 0); in ptemrput()
313 qreply(q, mp); in ptemrput()
319 ptioc(q, mp, RDSIDE); in ptemrput()
337 intptr_t sig = *(intptr_t *)mp->b_cont->b_rptr; in ptemrput()
344 mcopyin(mp, NULL, sizeof (int), NULL); in ptemrput()
345 qreply(q, mp); in ptemrput()
349 ptioc(q, mp, RDSIDE); in ptemrput()
354 ptioc(q, mp, RDSIDE); in ptemrput()
356 mcopyin(mp, NULL, sizeof (int), NULL); in ptemrput()
357 qreply(q, mp); in ptemrput()
362 putnext(q, mp); in ptemrput()
368 resp = (struct copyresp *)mp->b_rptr; in ptemrput()
373 freemsg(mp); in ptemrput()
385 ptioc(q, mp, RDSIDE); in ptemrput()
390 mp->b_datap->db_type = M_IOCACK; in ptemrput()
391 mioc2ack(mp, NULL, 0, 0); in ptemrput()
392 qreply(q, mp); in ptemrput()
396 freemsg(mp); in ptemrput()
409 freemsg(mp); in ptemrput()
425 putnext(q, mp); in ptemrput()
442 ptemwput(queue_t *q, mblk_t *mp) in ptemwput() argument
447 unsigned char type = mp->b_datap->db_type; in ptemwput()
453 resp = (struct copyresp *)mp->b_rptr; in ptemwput()
458 freemsg(mp); in ptemwput()
468 ptioc(q, mp, WRSIDE); in ptemwput()
473 mioc2ack(mp, NULL, 0, 0); in ptemwput()
474 qreply(q, mp); in ptemwput()
478 freemsg(mp); in ptemwput()
483 if (*mp->b_rptr & FLUSHW) { in ptemwput()
485 (*mp->b_rptr & FLUSHBAND)) in ptemwput()
486 flushband(q, *(mp->b_rptr + 1), in ptemwput()
491 putnext(q, mp); in ptemwput()
495 freemsg(mp); in ptemwput()
503 putnext(q, mp); in ptemwput()
511 putnext(q, mp); in ptemwput()
515 putnext(q, mp); in ptemwput()
524 if (q->q_first != NULL || !bcanputnext(q, mp->b_band)) { in ptemwput()
533 iocp = (struct iocblk *)mp->b_rptr; in ptemwput()
549 (void) ptemwmsg(q, mp); in ptemwput()
555 freemsg(mp); in ptemwput()
559 if ((mp->b_wptr - mp->b_rptr) < 0) { in ptemwput()
563 freemsg(mp); in ptemwput()
565 } else if ((mp->b_wptr - mp->b_rptr) == 0) { in ptemwput()
567 freemsg(mp); in ptemwput()
572 (void) putq(q, mp); in ptemwput()
578 if (!ptemwmsg(q, mp)) in ptemwput()
579 (void) putq(q, mp); in ptemwput()
589 mblk_t *mp; in ptemwsrv() local
591 while ((mp = getq(q)) != NULL) { in ptemwsrv()
592 if (!bcanputnext(q, mp->b_band) || !ptemwmsg(q, mp)) { in ptemwsrv()
593 (void) putbq(q, mp); in ptemwsrv()
609 ptemwmsg(queue_t *q, mblk_t *mp) in ptemwmsg() argument
621 switch (mp->b_datap->db_type) { in ptemwmsg()
632 iocp = (struct iocblk *)mp->b_rptr; in ptemwmsg()
641 miocnak(q, mp, 0, EAGAIN); in ptemwmsg()
655 error = miocpullup(mp, sizeof (struct termio)); in ptemwmsg()
657 miocnak(q, mp, 0, error); in ptemwmsg()
661 mp->b_cont->b_rptr)->c_cflag; in ptemwmsg()
669 error = miocpullup(mp, sizeof (struct termios)); in ptemwmsg()
671 miocnak(q, mp, 0, error); in ptemwmsg()
675 mp->b_cont->b_rptr)->c_cflag; in ptemwmsg()
699 if ((pckt_msgp = copymsg(mp)) == NULL) { in ptemwmsg()
700 miocnak(q, mp, 0, EAGAIN); in ptemwmsg()
708 mioc2ack(mp, NULL, 0, 0); in ptemwmsg()
709 qreply(q, mp); in ptemwmsg()
716 miocnak(q, mp, 0, EAGAIN); in ptemwmsg()
721 mioc2ack(mp, dp, sizeof (struct termio), 0); in ptemwmsg()
722 qreply(q, mp); in ptemwmsg()
728 miocnak(q, mp, 0, EAGAIN); in ptemwmsg()
733 mioc2ack(mp, dp, sizeof (struct termios), 0); in ptemwmsg()
734 qreply(q, mp); in ptemwmsg()
738 error = miocpullup(mp, sizeof (int)); in ptemwmsg()
740 miocnak(q, mp, 0, error); in ptemwmsg()
748 if ((pckt_msgp = copymsg(mp)) == NULL) { in ptemwmsg()
749 miocnak(q, mp, 0, EAGAIN); in ptemwmsg()
761 if (!(*(int *)mp->b_cont->b_rptr)) in ptemwmsg()
766 mioc2ack(mp, NULL, 0, 0); in ptemwmsg()
767 qreply(q, mp); in ptemwmsg()
773 ptioc(q, mp, WRSIDE); in ptemwmsg()
790 if ((pckt_msgp = copymsg(mp)) == NULL) { in ptemwmsg()
791 miocnak(q, mp, 0, EAGAIN); in ptemwmsg()
797 error = miocpullup(mp, sizeof (char)); in ptemwmsg()
800 miocnak(q, mp, 0, error); in ptemwmsg()
812 miocnak(q, mp, 0, EAGAIN); in ptemwmsg()
819 if (!bcanputnext(RD(q), mp->b_band)) { in ptemwmsg()
822 miocnak(q, mp, 0, EAGAIN); in ptemwmsg()
825 *bp->b_wptr++ = *mp->b_cont->b_rptr; in ptemwmsg()
830 mioc2ack(mp, NULL, 0, 0); in ptemwmsg()
831 qreply(q, mp); in ptemwmsg()
836 miocnak(q, mp, 0, EEXIST); in ptemwmsg()
839 mioc2ack(mp, NULL, 0, 0); in ptemwmsg()
840 qreply(q, mp); in ptemwmsg()
850 miocnak(q, mp, 0, EINVAL); in ptemwmsg()
856 freemsg(mp); in ptemwmsg()
860 if ((mp->b_wptr - mp->b_rptr) < 0) { in ptemwmsg()
864 freemsg(mp); in ptemwmsg()
866 } else if ((mp->b_wptr - mp->b_rptr) == 0) { in ptemwmsg()
868 freemsg(mp); in ptemwmsg()
877 putnext(q, mp); in ptemwmsg()
889 ptioc(queue_t *q, mblk_t *mp, int qside) in ptioc() argument
899 iocp = (struct iocblk *)mp->b_rptr; in ptioc()
911 miocnak(q, mp, 0, EINVAL); in ptioc()
917 miocnak(q, mp, 0, EAGAIN); in ptioc()
922 mcopyout(mp, NULL, sizeof (struct jwinsize), NULL, tmp); in ptioc()
924 mioc2ack(mp, tmp, sizeof (struct jwinsize), 0); in ptioc()
926 jwb = (struct jwinsize *)mp->b_cont->b_rptr; in ptioc()
932 qreply(q, mp); in ptioc()
938 miocnak(q, mp, 0, EAGAIN); in ptioc()
942 mioc2ack(mp, tmp, sizeof (struct winsize), 0); in ptioc()
944 wb = (struct winsize *)mp->b_cont->b_rptr; in ptioc()
950 qreply(q, mp); in ptioc()
954 error = miocpullup(mp, sizeof (struct winsize)); in ptioc()
956 miocnak(q, mp, 0, error); in ptioc()
960 wb = (struct winsize *)mp->b_cont->b_rptr; in ptioc()
980 mp->b_datap->db_type = M_IOCTL; in ptioc()
987 if ((pckt_msgp = copymsg(mp)) == NULL) { in ptioc()
988 miocnak(q, mp, 0, EAGAIN); in ptioc()
999 mioc2ack(mp, NULL, 0, 0); in ptioc()
1000 qreply(q, mp); in ptioc()
1010 if (DB_TYPE(mp) == M_IOCTL && iocp->ioc_count != TRANSPARENT) { in ptioc()
1011 error = miocpullup(mp, sizeof (int)); in ptioc()
1013 miocnak(q, mp, 0, error); in ptioc()
1018 if (DB_TYPE(mp) == M_IOCDATA || iocp->ioc_count != TRANSPARENT) in ptioc()
1019 sig = *(int *)mp->b_cont->b_rptr; in ptioc()
1021 sig = (int)*(intptr_t *)mp->b_cont->b_rptr; in ptioc()
1024 miocnak(q, mp, 0, EINVAL); in ptioc()
1034 miocnak(q, mp, 0, EAGAIN); in ptioc()
1038 mioc2ack(mp, NULL, 0, 0); in ptioc()
1039 qreply(q, mp); in ptioc()
1047 if (DB_TYPE(mp) == M_IOCTL) { in ptioc()
1048 error = miocpullup(mp, sizeof (int)); in ptioc()
1050 miocnak(q, mp, 0, error); in ptioc()
1055 onoff = *(int *)mp->b_cont->b_rptr; in ptioc()
1062 miocnak(q, mp, 0, EAGAIN); in ptioc()
1071 mioc2ack(mp, NULL, 0, 0); in ptioc()
1072 qreply(q, mp); in ptioc()
1085 putnext(q, mp); in ptioc()