Lines Matching defs:lhp

348 	struct ldi_handle	*lhp, **lhpp, *retlhp;
354 lhp = kmem_zalloc(sizeof (*lhp), KM_SLEEP);
373 kmem_free(lhp, sizeof (struct ldi_handle));
378 lhp->lh_ref = 1;
379 lhp->lh_vp = vp;
380 lhp->lh_ident = ident;
382 mutex_init(lhp->lh_lock, NULL, MUTEX_DEFAULT, NULL);
386 lhp->lh_type = 0;
389 lhp->lh_type |= LH_STREAM;
391 lhp->lh_type |= LH_CBDEV;
400 lhp->lh_next = ldi_handle_hash[index];
401 ldi_handle_hash[index] = lhp;
406 (void *)lhp, (void *)ident, (void *)vp,
411 return (lhp);
415 handle_release(struct ldi_handle *lhp)
420 ASSERT(lhp != NULL);
422 index = LH_HASH(lhp->lh_vp);
427 (void *)lhp, (void *)lhp->lh_ident, (void *)lhp->lh_vp,
428 mod_major_to_name(getmajor(lhp->lh_vp->v_rdev)),
429 getminor(lhp->lh_vp->v_rdev)));
431 ASSERT(lhp->lh_ref > 0);
432 if (--lhp->lh_ref > 0) {
439 lhpp = handle_find_ref_nolock(lhp->lh_vp, lhp->lh_ident);
441 *lhpp = lhp->lh_next;
445 VN_RELE(lhp->lh_vp);
446 ident_release(lhp->lh_ident);
448 mutex_destroy(lhp->lh_lock);
450 kmem_free(lhp, sizeof (struct ldi_handle));
460 struct ldi_handle *lhp = lep->le_lhp;
462 ASSERT(lhp != NULL);
464 mutex_enter(lhp->lh_lock);
465 if (lhp->lh_events == NULL) {
466 lhp->lh_events = lep;
467 mutex_exit(lhp->lh_lock);
471 lep->le_next = lhp->lh_events;
472 lhp->lh_events->le_prev = lep;
473 lhp->lh_events = lep;
474 mutex_exit(lhp->lh_lock);
480 struct ldi_handle *lhp = lep->le_lhp;
482 ASSERT(lhp != NULL);
484 mutex_enter(lhp->lh_lock);
489 if (lhp->lh_events == lep)
490 lhp->lh_events = lep->le_next;
491 mutex_exit(lhp->lh_lock);
732 ldi_handle_t *lhp, struct ldi_ident *li)
739 ASSERT((lhp != NULL) && (li != NULL));
777 *lhp = (ldi_handle_t)nlhp;
1162 struct ldi_handle *lhp;
1171 lhp = ldi_handle_hash[i];
1172 while ((lhp != NULL) && (ret == LDI_USAGE_CONTINUE)) {
1173 lip = lhp->lh_ident;
1174 vp = lhp->lh_vp;
1179 lhp = lhp->lh_next;
1212 struct ldi_handle *lhp = (struct ldi_handle *)arg;
1217 if (lhp == NULL)
1220 vpdown = lhp->lh_vp;
1368 struct ldi_handle *lhp;
1413 lhp = handle_find(vp, (struct ldi_ident *)li);
1414 handle_release(lhp);
1588 ldi_handle_t *lhp, ldi_ident_t li)
1596 (lhp == NULL) || (lip == NULL))
1604 if ((ret = ldi_open_by_vp(&vp, flag, cr, lhp, lip)) == 0) {
1615 ldi_handle_t *lhp, ldi_ident_t li)
1623 (cr == NULL) || (lhp == NULL) || (lip == NULL))
1631 ret = ldi_open_by_vp(&vp, flag, cr, lhp, lip);
1640 int flag, cred_t *cr, ldi_handle_t *lhp, ldi_ident_t li)
1648 (lhp == NULL) || (lip == NULL))
1656 ret = ldi_open_by_vp(&vp, flag, cr, lhp, lip);
3160 struct ldi_handle *lhp = (struct ldi_handle *)lh;
3186 dev = lhp->lh_vp->v_rdev;
3187 csp = VTOCS(lhp->lh_vp);
3197 "LDI handle: %p", (void *)lhp);
3213 lhp->lh_ident->li_modname);
3241 lecp->lec_lhp = lhp;
3242 lecp->lec_dev = lhp->lh_vp->v_rdev;
3243 lecp->lec_spec = VTYP_TO_STYP(lhp->lh_vp->v_type);