Lines Matching refs:sip

217 	struct fmev_subinfo *sip = arg;  in fmev_proxy_cb()  local
218 fmev_shdl_impl_t *ihdl = sip->si_ihdl; in fmev_proxy_cb()
231 sip->si_cb(ev, class, nvl, sip->si_cbarg); in fmev_proxy_cb()
248 struct fmev_subinfo *sip; in fmev_shdl_subscribe() local
268 if ((sip = fmev_shdl_zalloc(hdl, sizeof (*sip))) == NULL) in fmev_shdl_subscribe()
271 (void) strncpy(sip->si_pat, pat, sizeof (sip->si_pat)); in fmev_shdl_subscribe()
273 uu_avl_node_init(sip, &sip->si_node, ihdl->sh_pool); in fmev_shdl_subscribe()
277 if (uu_avl_find(ihdl->sh_avl, sip, NULL, &idx) != NULL) { in fmev_shdl_subscribe()
279 fmev_shdl_free(hdl, sip, sizeof (*sip)); in fmev_shdl_subscribe()
290 (void) snprintf(sip->si_sid, sizeof (sip->si_sid), "%llx", nsid); in fmev_shdl_subscribe()
292 sip->si_ihdl = ihdl; in fmev_shdl_subscribe()
293 sip->si_cb = func; in fmev_shdl_subscribe()
294 sip->si_cbarg = funcarg; in fmev_shdl_subscribe()
296 if ((serr = sysevent_evc_xsubscribe(ihdl->sh_binding, sip->si_sid, in fmev_shdl_subscribe()
297 sip->si_pat, fmev_proxy_cb, sip, 0, ihdl->sh_attr)) != 0) { in fmev_shdl_subscribe()
301 fmev_shdl_free(hdl, sip, sizeof (*sip)); in fmev_shdl_subscribe()
316 uu_avl_insert(ihdl->sh_avl, sip, idx); in fmev_shdl_subscribe()
325 fmev_subinfo_fini(fmev_shdl_impl_t *ihdl, struct fmev_subinfo *sip, in fmev_subinfo_fini() argument
330 ASSERT(sip->si_ihdl == ihdl); in fmev_subinfo_fini()
332 err = sysevent_evc_unsubscribe(ihdl->sh_binding, sip->si_sid); in fmev_subinfo_fini()
336 uu_avl_remove(ihdl->sh_avl, sip); in fmev_subinfo_fini()
337 uu_avl_node_fini(sip, &sip->si_node, ihdl->sh_pool); in fmev_subinfo_fini()
339 fmev_shdl_free(IHDL2HDL(ihdl), sip, sizeof (*sip)); in fmev_subinfo_fini()
351 struct fmev_subinfo *sip; in fmev_shdl_unsubscribe() local
369 if ((sip = uu_avl_find(ihdl->sh_avl, &si, NULL, NULL)) != NULL) { in fmev_shdl_unsubscribe()
370 if ((err = fmev_subinfo_fini(ihdl, sip, B_TRUE)) == 0) { in fmev_shdl_unsubscribe()
673 struct fmev_subinfo *sip; in fmev_shdl_fini() local
675 while ((sip = uu_avl_teardown(ihdl->sh_avl, &cookie)) != NULL) in fmev_shdl_fini()
676 (void) fmev_subinfo_fini(ihdl, sip, B_FALSE); in fmev_shdl_fini()