Lines Matching refs:q

65 static	int tirdwropen(queue_t *q, dev_t *dev,
68 static int tirdwrclose(queue_t *q, int flag, cred_t *cr);
70 static int check_strhead(queue_t *q);
76 static int tirdwrrput(queue_t *q, mblk_t *mp);
77 static int tirdwrwput(queue_t *q, mblk_t *mp);
147 static void send_fatal(queue_t *q, mblk_t *mp);
148 static void strip_strhead(queue_t *q);
158 queue_t *q, in tirdwropen() argument
167 if (q->q_ptr) { in tirdwropen()
178 trwptr->trw_rdq = q; in tirdwropen()
179 q->q_ptr = (caddr_t)trwptr; in tirdwropen()
180 WR(q)->q_ptr = (caddr_t)trwptr; in tirdwropen()
181 qprocson(q); in tirdwropen()
183 freezestr(q); in tirdwropen()
185 (void) strqset(WR(q), QMAXPSZ, 0, (uintptr_t)WR(q)->q_next->q_maxpsz); in tirdwropen()
186 (void) strqset(q, QMAXPSZ, 0, (uintptr_t)q->q_next->q_maxpsz); in tirdwropen()
188 if (!check_strhead(q)) { in tirdwropen()
189 unfreezestr(q); in tirdwropen()
190 qprocsoff(q); in tirdwropen()
194 strip_strhead(q); in tirdwropen()
195 unfreezestr(q); in tirdwropen()
207 tirdwrclose(queue_t *q, int flag, cred_t *cr) in tirdwrclose() argument
213 qprocsoff(q); in tirdwrclose()
214 trwptr = (struct trw_trw *)q->q_ptr; in tirdwrclose()
227 putnext(WR(q), mp); in tirdwrclose()
242 tirdwrrput(queue_t *q, mblk_t *mp) in tirdwrrput() argument
248 trwptr = (struct trw_trw *)q->q_ptr; in tirdwrrput()
260 putnext(q, mp); in tirdwrrput()
264 putnext(q, mp); in tirdwrrput()
280 send_fatal(q, mp); in tirdwrrput()
290 putnext(q, tmp); in tirdwrrput()
297 putnext(q, mp); in tirdwrrput()
305 putnext(q, tmp); in tirdwrrput()
309 putnext(q, mp); in tirdwrrput()
313 send_fatal(q, mp); in tirdwrrput()
327 tirdwrwput(queue_t *q, mblk_t *mp) in tirdwrwput() argument
331 trwptr = (struct trw_trw *)q->q_ptr; in tirdwrwput()
342 putnext(q, mp); in tirdwrwput()
346 putnext(q, mp); in tirdwrwput()
351 send_fatal(q, mp); in tirdwrwput()
359 send_fatal(queue_t *q, mblk_t *mp) in send_fatal() argument
363 trwptr = (struct trw_trw *)q->q_ptr; in send_fatal()
371 if (q->q_flag&QREADR) in send_fatal()
372 putnext(q, mp); in send_fatal()
374 qreply(q, mp); in send_fatal()
378 check_strhead(queue_t *q) in check_strhead() argument
383 for (mp = q->q_next->q_first; mp != NULL; mp = mp->b_next) { in check_strhead()
418 strip_strhead(queue_t *q) in strip_strhead() argument
425 q = q->q_next; in strip_strhead()
427 for (mp = q->q_first; mp != NULL; ) { in strip_strhead()
438 rmvq(q, mp); in strip_strhead()
444 rmvq(q, mp); in strip_strhead()
447 (void) insq(q, emp, tmp); in strip_strhead()