Lines Matching refs:lp
136 srinterrupt(iwscn_list_t *lp, boolean_t wait) in srinterrupt() argument
140 while (lp->wl_ref_cnt != 0) { in srinterrupt()
141 strsetrerror(lp->wl_vp, EINTR, 0, NULL); in srinterrupt()
142 strsetwerror(lp->wl_vp, EINTR, 0, NULL); in srinterrupt()
156 iwscn_list_t *lp, **lpp; in srrm() local
165 for (lpp = &iwscn_list; (lp = *lpp) != NULL; lpp = &lp->wl_next) { in srrm()
166 if (lp->wl_vp == vp) in srrm()
169 if (lp != NULL) in srrm()
171 *lpp = lp->wl_next; in srrm()
173 return (lp); in srrm()
183 iwscn_list_t *lp; in srpush() local
192 if ((lp = srrm(vp)) == NULL) { in srpush()
193 lp = kmem_zalloc(sizeof (*lp), KM_SLEEP); in srpush()
194 lp->wl_vp = vp; in srpush()
195 lp->wl_is_console = is_console; in srpush()
202 lp->wl_next = iwscn_list; in srpush()
203 iwscn_list = lp; in srpush()
216 iwscn_list_t *lp, **lpp; in srpop() local
246 for (lpp = &iwscn_list; (lp = *lpp) != NULL; ) in srpop()
247 lpp = &lp->wl_next; in srpop()
258 iwscn_list_t *lp; in srhold() local
262 lp = iwscn_list; in srhold()
263 ASSERT(lp->wl_ref_cnt >= 0); in srhold()
264 lp->wl_ref_cnt++; in srhold()
267 return (lp); in srhold()
272 srrele(iwscn_list_t *lp) in srrele() argument
274 ASSERT(lp != NULL); in srrele()
276 ASSERT(lp->wl_ref_cnt > 0); in srrele()
277 lp->wl_ref_cnt--; in srrele()
285 iwscn_list_t *lp; in iwscnread() local
290 lp = srhold(); in iwscnread()
291 error = strread(lp->wl_vp, uio, cred); in iwscnread()
292 srrele(lp); in iwscnread()
300 iwscn_list_t *lp; in iwscnwrite() local
305 lp = srhold(); in iwscnwrite()
306 error = strwrite(lp->wl_vp, uio, cred); in iwscnwrite()
307 srrele(lp); in iwscnwrite()
316 iwscn_list_t *lp; in iwscnpoll() local
321 lp = srhold(); in iwscnpoll()
322 error = VOP_POLL(lp->wl_vp, events, anyyet, reventsp, phpp, NULL); in iwscnpoll()
323 srrele(lp); in iwscnpoll()
332 iwscn_list_t *lp; in iwscnioctl() local
417 lp = srhold(); in iwscnioctl()
418 *rvalp = (str_vp(f->f_vnode) == lp->wl_vp); in iwscnioctl()
419 srrele(lp); in iwscnioctl()
430 lp = srhold(); in iwscnioctl()
440 (void) strioctl(lp->wl_vp, I_LOOK, (intptr_t)modname, in iwscnioctl()
444 srrele(lp); in iwscnioctl()
450 error = VOP_IOCTL(lp->wl_vp, cmd, arg, flag, cred, rvalp, NULL); in iwscnioctl()
452 srrele(lp); in iwscnioctl()
458 lp = srhold(); in iwscnioctl()
459 error = VOP_IOCTL(lp->wl_vp, cmd, arg, flag, cred, rvalp, NULL); in iwscnioctl()
460 srrele(lp); in iwscnioctl()
468 iwscn_list_t *lp; in iwscnopen() local
558 for (lp = iwscn_list; lp != NULL; lp = lp->wl_next) { in iwscnopen()
559 ASSERT(lp->wl_vp->v_stream != NULL); in iwscnopen()
560 str_cn_clean(lp->wl_vp); in iwscnopen()
571 iwscn_list_t *lp; in iwscnclose() local
584 lp = srrm(iwscn_list->wl_vp); in iwscnclose()
585 ASSERT(lp != NULL); in iwscnclose()
586 srinterrupt(lp, B_TRUE); in iwscnclose()
588 if (lp->wl_is_console == B_TRUE) in iwscnclose()
590 (void) VOP_CLOSE(lp->wl_vp, 0, 1, (offset_t)0, kcred, in iwscnclose()
593 kmem_free(lp, sizeof (*lp)); in iwscnclose()