• Home
  • Raw
  • Download

Lines Matching refs:evcb

492 event_callback_to_event(struct event_callback *evcb)  in event_callback_to_event()  argument
494 EVUTIL_ASSERT((evcb->evcb_flags & EVLIST_INIT)); in event_callback_to_event()
495 return EVUTIL_UPCAST(evcb, struct event, ev_evcallback); in event_callback_to_event()
776 struct event_callback *evcb, in event_base_cancel_single_callback_() argument
781 if (evcb->evcb_flags & EVLIST_INIT) { in event_base_cancel_single_callback_()
782 struct event *ev = event_callback_to_event(evcb); in event_base_cancel_single_callback_()
789 event_callback_cancel_nolock_(base, evcb, 1); in event_base_cancel_single_callback_()
794 if (run_finalizers && (evcb->evcb_flags & EVLIST_FINALIZING)) { in event_base_cancel_single_callback_()
795 switch (evcb->evcb_closure) { in event_base_cancel_single_callback_()
798 struct event *ev = event_callback_to_event(evcb); in event_base_cancel_single_callback_()
800 if (evcb->evcb_closure == EV_CLOSURE_EVENT_FINALIZE_FREE) in event_base_cancel_single_callback_()
805 evcb->evcb_cb_union.evcb_cbfinalize(evcb, evcb->evcb_arg); in event_base_cancel_single_callback_()
819 struct event_callback *evcb, *next; in event_base_free_queues_() local
820 for (evcb = TAILQ_FIRST(&base->activequeues[i]); evcb; ) { in event_base_free_queues_()
821 next = TAILQ_NEXT(evcb, evcb_active_next); in event_base_free_queues_()
822 deleted += event_base_cancel_single_callback_(base, evcb, run_finalizers); in event_base_free_queues_()
823 evcb = next; in event_base_free_queues_()
828 struct event_callback *evcb; in event_base_free_queues_() local
829 while ((evcb = TAILQ_FIRST(&base->active_later_queue))) { in event_base_free_queues_()
830 deleted += event_base_cancel_single_callback_(base, evcb, run_finalizers); in event_base_free_queues_()
1638 struct event_callback *evcb; in event_process_active_single_queue() local
1643 for (evcb = TAILQ_FIRST(activeq); evcb; evcb = TAILQ_FIRST(activeq)) { in event_process_active_single_queue()
1645 if (evcb->evcb_flags & EVLIST_INIT) { in event_process_active_single_queue()
1646 ev = event_callback_to_event(evcb); in event_process_active_single_queue()
1649 event_queue_remove_active(base, evcb); in event_process_active_single_queue()
1660 event_queue_remove_active(base, evcb); in event_process_active_single_queue()
1663 evcb, evcb->evcb_closure, evcb->evcb_cb_union.evcb_callback)); in event_process_active_single_queue()
1666 if (!(evcb->evcb_flags & EVLIST_INTERNAL)) in event_process_active_single_queue()
1670 base->current_event = evcb; in event_process_active_single_queue()
1675 switch (evcb->evcb_closure) { in event_process_active_single_queue()
1695 void (*evcb_selfcb)(struct event_callback *, void *) = evcb->evcb_cb_union.evcb_selfcb; in event_process_active_single_queue()
1697 evcb_selfcb(evcb, evcb->evcb_arg); in event_process_active_single_queue()
1703 int evcb_closure = evcb->evcb_closure; in event_process_active_single_queue()
1707 EVUTIL_ASSERT((evcb->evcb_flags & EVLIST_FINALIZING)); in event_process_active_single_queue()
1716 void (*evcb_cbfinalize)(struct event_callback *, void *) = evcb->evcb_cb_union.evcb_cbfinalize; in event_process_active_single_queue()
1718 EVUTIL_ASSERT((evcb->evcb_flags & EVLIST_FINALIZING)); in event_process_active_single_queue()
1720 evcb_cbfinalize(evcb, evcb->evcb_arg); in event_process_active_single_queue()
2199 struct event_callback *evcb = base->current_event; in event_base_get_running_event() local
2200 if (evcb->evcb_flags & EVLIST_INIT) in event_base_get_running_event()
2201 ev = event_callback_to_event(evcb); in event_base_get_running_event()
2289 …e_nolock_(struct event_base *base, unsigned flags, struct event_callback *evcb, void (*cb)(struct … in event_callback_finalize_nolock_() argument
2292 if (evcb->evcb_flags & EVLIST_INIT) { in event_callback_finalize_nolock_()
2293 ev = event_callback_to_event(evcb); in event_callback_finalize_nolock_()
2296 event_callback_cancel_nolock_(base, evcb, 0); /*XXX can this fail?*/ in event_callback_finalize_nolock_()
2299 evcb->evcb_closure = EV_CLOSURE_CB_FINALIZE; in event_callback_finalize_nolock_()
2300 evcb->evcb_cb_union.evcb_cbfinalize = cb; in event_callback_finalize_nolock_()
2301 event_callback_activate_nolock_(base, evcb); /* XXX can this really fail?*/ in event_callback_finalize_nolock_()
2302 evcb->evcb_flags |= EVLIST_FINALIZING; in event_callback_finalize_nolock_()
2306 event_callback_finalize_(struct event_base *base, unsigned flags, struct event_callback *evcb, void… in event_callback_finalize_() argument
2309 event_callback_finalize_nolock_(base, flags, evcb, cb); in event_callback_finalize_()
2332 struct event_callback *evcb = evcbs[i]; in event_callback_finalize_many_() local
2333 if (evcb == base->current_event) { in event_callback_finalize_many_()
2334 event_callback_finalize_nolock_(base, 0, evcb, cb); in event_callback_finalize_many_()
2337 event_callback_cancel_nolock_(base, evcb, 0); in event_callback_finalize_many_()
2996 struct event_callback *evcb) in event_callback_activate_() argument
3000 r = event_callback_activate_nolock_(base, evcb); in event_callback_activate_()
3007 struct event_callback *evcb) in event_callback_activate_nolock_() argument
3011 if (evcb->evcb_flags & EVLIST_FINALIZING) in event_callback_activate_nolock_()
3014 switch (evcb->evcb_flags & (EVLIST_ACTIVE|EVLIST_ACTIVE_LATER)) { in event_callback_activate_nolock_()
3019 event_queue_remove_active_later(base, evcb); in event_callback_activate_nolock_()
3028 event_queue_insert_active(base, evcb); in event_callback_activate_nolock_()
3038 struct event_callback *evcb) in event_callback_activate_later_nolock_() argument
3040 if (evcb->evcb_flags & (EVLIST_ACTIVE|EVLIST_ACTIVE_LATER)) in event_callback_activate_later_nolock_()
3043 event_queue_insert_active_later(base, evcb); in event_callback_activate_later_nolock_()
3059 struct event_callback *evcb) in event_callback_cancel_() argument
3063 r = event_callback_cancel_nolock_(base, evcb, 0); in event_callback_cancel_()
3070 struct event_callback *evcb, int even_if_finalizing) in event_callback_cancel_nolock_() argument
3072 if ((evcb->evcb_flags & EVLIST_FINALIZING) && !even_if_finalizing) in event_callback_cancel_nolock_()
3075 if (evcb->evcb_flags & EVLIST_INIT) in event_callback_cancel_nolock_()
3076 return event_del_nolock_(event_callback_to_event(evcb), in event_callback_cancel_nolock_()
3079 switch ((evcb->evcb_flags & (EVLIST_ACTIVE|EVLIST_ACTIVE_LATER))) { in event_callback_cancel_nolock_()
3086 event_queue_remove_active(base, evcb); in event_callback_cancel_nolock_()
3089 event_queue_remove_active_later(base, evcb); in event_callback_cancel_nolock_()
3236 event_queue_remove_active(struct event_base *base, struct event_callback *evcb) in event_queue_remove_active() argument
3239 if (EVUTIL_FAILURE_CHECK(!(evcb->evcb_flags & EVLIST_ACTIVE))) { in event_queue_remove_active()
3241 evcb, EVLIST_ACTIVE); in event_queue_remove_active()
3244 DECR_EVENT_COUNT(base, evcb->evcb_flags); in event_queue_remove_active()
3245 evcb->evcb_flags &= ~EVLIST_ACTIVE; in event_queue_remove_active()
3248 TAILQ_REMOVE(&base->activequeues[evcb->evcb_pri], in event_queue_remove_active()
3249 evcb, evcb_active_next); in event_queue_remove_active()
3252 event_queue_remove_active_later(struct event_base *base, struct event_callback *evcb) in event_queue_remove_active_later() argument
3255 if (EVUTIL_FAILURE_CHECK(!(evcb->evcb_flags & EVLIST_ACTIVE_LATER))) { in event_queue_remove_active_later()
3257 evcb, EVLIST_ACTIVE_LATER); in event_queue_remove_active_later()
3260 DECR_EVENT_COUNT(base, evcb->evcb_flags); in event_queue_remove_active_later()
3261 evcb->evcb_flags &= ~EVLIST_ACTIVE_LATER; in event_queue_remove_active_later()
3264 TAILQ_REMOVE(&base->active_later_queue, evcb, evcb_active_next); in event_queue_remove_active_later()
3377 event_queue_insert_active(struct event_base *base, struct event_callback *evcb) in event_queue_insert_active() argument
3381 if (evcb->evcb_flags & EVLIST_ACTIVE) { in event_queue_insert_active()
3386 INCR_EVENT_COUNT(base, evcb->evcb_flags); in event_queue_insert_active()
3388 evcb->evcb_flags |= EVLIST_ACTIVE; in event_queue_insert_active()
3392 EVUTIL_ASSERT(evcb->evcb_pri < base->nactivequeues); in event_queue_insert_active()
3393 TAILQ_INSERT_TAIL(&base->activequeues[evcb->evcb_pri], in event_queue_insert_active()
3394 evcb, evcb_active_next); in event_queue_insert_active()
3398 event_queue_insert_active_later(struct event_base *base, struct event_callback *evcb) in event_queue_insert_active_later() argument
3401 if (evcb->evcb_flags & (EVLIST_ACTIVE_LATER|EVLIST_ACTIVE)) { in event_queue_insert_active_later()
3406 INCR_EVENT_COUNT(base, evcb->evcb_flags); in event_queue_insert_active_later()
3407 evcb->evcb_flags |= EVLIST_ACTIVE_LATER; in event_queue_insert_active_later()
3410 EVUTIL_ASSERT(evcb->evcb_pri < base->nactivequeues); in event_queue_insert_active_later()
3411 TAILQ_INSERT_TAIL(&base->active_later_queue, evcb, evcb_active_next); in event_queue_insert_active_later()
3441 struct event_callback *evcb; in event_queue_make_later_events_active() local
3444 while ((evcb = TAILQ_FIRST(&base->active_later_queue))) { in event_queue_make_later_events_active()
3445 TAILQ_REMOVE(&base->active_later_queue, evcb, evcb_active_next); in event_queue_make_later_events_active()
3446 evcb->evcb_flags = (evcb->evcb_flags & ~EVLIST_ACTIVE_LATER) | EVLIST_ACTIVE; in event_queue_make_later_events_active()
3447 EVUTIL_ASSERT(evcb->evcb_pri < base->nactivequeues); in event_queue_make_later_events_active()
3448 TAILQ_INSERT_TAIL(&base->activequeues[evcb->evcb_pri], evcb, evcb_active_next); in event_queue_make_later_events_active()
3449 base->n_deferreds_queued += (evcb->evcb_closure == EV_CLOSURE_CB_SELF); in event_queue_make_later_events_active()
3722 struct event_callback *evcb; in event_base_foreach_event_nolock_() local
3723 TAILQ_FOREACH(evcb, &base->activequeues[i], evcb_active_next) { in event_base_foreach_event_nolock_()
3724 if ((evcb->evcb_flags & (EVLIST_INIT|EVLIST_INSERTED|EVLIST_TIMEOUT)) != EVLIST_INIT) { in event_base_foreach_event_nolock_()
3730 ev = event_callback_to_event(evcb); in event_base_foreach_event_nolock_()
4003 struct event_callback *evcb; in event_base_assert_ok_nolock_() local
4005 TAILQ_FOREACH(evcb, &base->activequeues[i], evcb_active_next) { in event_base_assert_ok_nolock_()
4006 EVUTIL_ASSERT((evcb->evcb_flags & (EVLIST_ACTIVE|EVLIST_ACTIVE_LATER)) == EVLIST_ACTIVE); in event_base_assert_ok_nolock_()
4007 EVUTIL_ASSERT(evcb->evcb_pri == i); in event_base_assert_ok_nolock_()
4013 struct event_callback *evcb; in event_base_assert_ok_nolock_() local
4014 TAILQ_FOREACH(evcb, &base->active_later_queue, evcb_active_next) { in event_base_assert_ok_nolock_()
4015 EVUTIL_ASSERT((evcb->evcb_flags & (EVLIST_ACTIVE|EVLIST_ACTIVE_LATER)) == EVLIST_ACTIVE_LATER); in event_base_assert_ok_nolock_()