Lines Matching defs:nep
318 kcf_ntfy_elem_t *nep;
328 nep = kmem_zalloc(sizeof (kcf_ntfy_elem_t), KM_SLEEP);
329 mutex_init(&nep->kn_lock, NULL, MUTEX_DEFAULT, NULL);
330 cv_init(&nep->kn_cv, NULL, CV_DEFAULT, NULL);
331 nep->kn_state = NTFY_WAITING;
332 nep->kn_func = nf;
333 nep->kn_event_mask = event_mask;
337 ntfy_list_head = ntfy_list_tail = nep;
339 ntfy_list_tail->kn_next = nep;
340 nep->kn_prev = ntfy_list_tail;
341 ntfy_list_tail = nep;
344 hndl = (crypto_notify_handle_t)nep;
367 kcf_ntfy_elem_t *nep = (kcf_ntfy_elem_t *)hndl;
374 mutex_enter(&nep->kn_lock);
376 if (nep->kn_state == NTFY_WAITING) {
377 kcf_ntfy_elem_t *nextp = nep->kn_next;
378 kcf_ntfy_elem_t *prevp = nep->kn_prev;
390 ASSERT(nep->kn_state == NTFY_RUNNING);
405 while (nep->kn_state == NTFY_RUNNING)
406 cv_wait(&nep->kn_cv, &nep->kn_lock);
407 mutex_exit(&nep->kn_lock);
419 mutex_exit(&nep->kn_lock);
422 mutex_destroy(&nep->kn_lock);
423 cv_destroy(&nep->kn_cv);
424 kmem_free(nep, sizeof (kcf_ntfy_elem_t));
435 kcf_ntfy_elem_t *nep;
445 for (nep = ntfy_list_head; nep != NULL; nep = nep->kn_next)
448 for (nep = ntfy_list_head; (nep != NULL && nelem); nep = nep->kn_next) {
455 if (!(nep->kn_event_mask & event))
458 mutex_enter(&nep->kn_lock);
459 nep->kn_state = NTFY_RUNNING;
460 mutex_exit(&nep->kn_lock);
469 * changes to NTFY_WAITING. Hence, nep is assured to be valid.
471 (*nep->kn_func)(event, event_arg);
473 mutex_enter(&nep->kn_lock);
474 nep->kn_state = NTFY_WAITING;
475 cv_broadcast(&nep->kn_cv);
476 mutex_exit(&nep->kn_lock);