Lines Matching refs:rnip
1172 rc_notify_info_interested(rc_notify_info_t *rnip, rc_notify_t *np) in rc_notify_info_interested() argument
1190 if (rnip->rni_namelist[i] != NULL) { in rc_notify_info_interested()
1191 if (strcmp(nnp->rn_name, rnip->rni_namelist[i]) == 0) in rc_notify_info_interested()
1194 if (rnip->rni_typelist[i] != NULL) { in rc_notify_info_interested()
1195 if (strcmp(nnp->rn_type, rnip->rni_typelist[i]) == 0) in rc_notify_info_interested()
7352 rc_notify_info_init(rc_notify_info_t *rnip) in rc_notify_info_init() argument
7356 uu_list_node_init(rnip, &rnip->rni_list_node, rc_notify_info_pool); in rc_notify_info_init()
7357 uu_list_node_init(&rnip->rni_notify, &rnip->rni_notify.rcn_list_node, in rc_notify_info_init()
7360 rnip->rni_notify.rcn_node = NULL; in rc_notify_info_init()
7361 rnip->rni_notify.rcn_info = rnip; in rc_notify_info_init()
7363 bzero(rnip->rni_namelist, sizeof (rnip->rni_namelist)); in rc_notify_info_init()
7364 bzero(rnip->rni_typelist, sizeof (rnip->rni_typelist)); in rc_notify_info_init()
7366 (void) pthread_cond_init(&rnip->rni_cv, NULL); in rc_notify_info_init()
7369 rnip->rni_namelist[i] = NULL; in rc_notify_info_init()
7370 rnip->rni_typelist[i] = NULL; in rc_notify_info_init()
7375 rc_notify_info_insert_locked(rc_notify_info_t *rnip) in rc_notify_info_insert_locked() argument
7379 assert(!(rnip->rni_flags & RC_NOTIFY_ACTIVE)); in rc_notify_info_insert_locked()
7381 rnip->rni_flags |= RC_NOTIFY_ACTIVE; in rc_notify_info_insert_locked()
7382 (void) uu_list_insert_after(rc_notify_info_list, NULL, rnip); in rc_notify_info_insert_locked()
7383 (void) uu_list_insert_before(rc_notify_list, NULL, &rnip->rni_notify); in rc_notify_info_insert_locked()
7387 rc_notify_info_remove_locked(rc_notify_info_t *rnip) in rc_notify_info_remove_locked() argument
7389 rc_notify_t *me = &rnip->rni_notify; in rc_notify_info_remove_locked()
7394 assert(rnip->rni_flags & RC_NOTIFY_ACTIVE); in rc_notify_info_remove_locked()
7396 assert(!(rnip->rni_flags & RC_NOTIFY_DRAIN)); in rc_notify_info_remove_locked()
7397 rnip->rni_flags |= RC_NOTIFY_DRAIN; in rc_notify_info_remove_locked()
7398 (void) pthread_cond_broadcast(&rnip->rni_cv); in rc_notify_info_remove_locked()
7400 (void) uu_list_remove(rc_notify_info_list, rnip); in rc_notify_info_remove_locked()
7420 while (rnip->rni_waiters) { in rc_notify_info_remove_locked()
7422 (void) pthread_cond_broadcast(&rnip->rni_cv); in rc_notify_info_remove_locked()
7423 (void) pthread_cond_wait(&rnip->rni_cv, &rc_pg_notify_lock); in rc_notify_info_remove_locked()
7426 rnip->rni_flags &= ~(RC_NOTIFY_DRAIN | RC_NOTIFY_ACTIVE); in rc_notify_info_remove_locked()
7430 rc_notify_info_add_watch(rc_notify_info_t *rnip, const char **arr, in rc_notify_info_add_watch() argument
7447 while (rnip->rni_flags & RC_NOTIFY_EMPTYING) in rc_notify_info_add_watch()
7448 (void) pthread_cond_wait(&rnip->rni_cv, &rc_pg_notify_lock); in rc_notify_info_add_watch()
7472 if (!(rnip->rni_flags & RC_NOTIFY_ACTIVE)) in rc_notify_info_add_watch()
7473 rc_notify_info_insert_locked(rnip); in rc_notify_info_add_watch()
7480 rc_notify_info_add_name(rc_notify_info_t *rnip, const char *name) in rc_notify_info_add_name() argument
7482 return (rc_notify_info_add_watch(rnip, rnip->rni_namelist, name)); in rc_notify_info_add_name()
7486 rc_notify_info_add_type(rc_notify_info_t *rnip, const char *type) in rc_notify_info_add_type() argument
7488 return (rc_notify_info_add_watch(rnip, rnip->rni_typelist, type)); in rc_notify_info_add_type()
7495 rc_notify_info_wait(rc_notify_info_t *rnip, rc_node_ptr_t *out, in rc_notify_info_wait() argument
7499 rc_notify_t *me = &rnip->rni_notify; in rc_notify_info_wait()
7510 while ((rnip->rni_flags & (RC_NOTIFY_ACTIVE | RC_NOTIFY_DRAIN)) == in rc_notify_info_wait()
7520 rnip->rni_waiters++; in rc_notify_info_wait()
7523 rnip->rni_waiters--; in rc_notify_info_wait()
7531 while (np != NULL && !rc_notify_info_interested(rnip, np)) { in rc_notify_info_wait()
7552 rnip->rni_waiters++; in rc_notify_info_wait()
7553 (void) pthread_cond_wait(&rnip->rni_cv, in rc_notify_info_wait()
7555 rnip->rni_waiters--; in rc_notify_info_wait()
7616 if (rnip->rni_waiters == 0) in rc_notify_info_wait()
7617 (void) pthread_cond_broadcast(&rnip->rni_cv); in rc_notify_info_wait()
7623 rc_notify_info_reset(rc_notify_info_t *rnip) in rc_notify_info_reset() argument
7628 if (rnip->rni_flags & RC_NOTIFY_ACTIVE) in rc_notify_info_reset()
7629 rc_notify_info_remove_locked(rnip); in rc_notify_info_reset()
7630 assert(!(rnip->rni_flags & (RC_NOTIFY_DRAIN | RC_NOTIFY_EMPTYING))); in rc_notify_info_reset()
7631 rnip->rni_flags |= RC_NOTIFY_EMPTYING; in rc_notify_info_reset()
7635 if (rnip->rni_namelist[i] != NULL) { in rc_notify_info_reset()
7636 free((void *)rnip->rni_namelist[i]); in rc_notify_info_reset()
7637 rnip->rni_namelist[i] = NULL; in rc_notify_info_reset()
7639 if (rnip->rni_typelist[i] != NULL) { in rc_notify_info_reset()
7640 free((void *)rnip->rni_typelist[i]); in rc_notify_info_reset()
7641 rnip->rni_typelist[i] = NULL; in rc_notify_info_reset()
7646 rnip->rni_flags &= ~RC_NOTIFY_EMPTYING; in rc_notify_info_reset()
7651 rc_notify_info_fini(rc_notify_info_t *rnip) in rc_notify_info_fini() argument
7653 rc_notify_info_reset(rnip); in rc_notify_info_fini()
7655 uu_list_node_fini(rnip, &rnip->rni_list_node, rc_notify_info_pool); in rc_notify_info_fini()
7656 uu_list_node_fini(&rnip->rni_notify, &rnip->rni_notify.rcn_list_node, in rc_notify_info_fini()