Lines Matching refs:evpd
143 struct evport_data *evpd; in evport_init() local
145 if (!(evpd = mm_calloc(1, sizeof(struct evport_data)))) in evport_init()
148 if ((evpd->ed_port = port_create()) == -1) { in evport_init()
149 mm_free(evpd); in evport_init()
153 if (grow(evpd, INITIAL_EVENTS_PER_GETN) < 0) { in evport_init()
154 close(evpd->ed_port); in evport_init()
155 mm_free(evpd); in evport_init()
159 evpd->ed_npending = 0; in evport_init()
163 return (evpd); in evport_init()
202 check_evportop(struct evport_data *evpd) in check_evportop() argument
204 EVUTIL_ASSERT(evpd); in check_evportop()
205 EVUTIL_ASSERT(evpd->ed_port > 0); in check_evportop()
381 struct evport_data *evpd = base->evbase; in evport_add() local
384 check_evportop(evpd); in evport_add()
388 return reassociate(evpd, fdi, fd); in evport_add()
398 struct evport_data *evpd = base->evbase; in evport_del() local
402 check_evportop(evpd); in evport_del()
408 port_dissociate(evpd->ed_port, PORT_SOURCE_FD, fd) == -1) { in evport_del()
419 return (reassociate(evpd, fdi, fd)); in evport_del()
425 EVUTIL_ASSERT(evpd->ed_pending[i] == fd); in evport_del()
426 evpd->ed_pending[i] = -1; in evport_del()
437 struct evport_data *evpd = base->evbase; in evport_dealloc() local
441 close(evpd->ed_port); in evport_dealloc()
443 if (evpd->ed_pending) in evport_dealloc()
444 mm_free(evpd->ed_pending); in evport_dealloc()
445 if (evpd->ed_pevtlist) in evport_dealloc()
446 mm_free(evpd->ed_pevtlist); in evport_dealloc()
448 mm_free(evpd); in evport_dealloc()