Lines Matching refs:ev
129 static inline int event_add_internal(struct event *ev,
131 static inline int event_del_internal(struct event *ev);
143 static inline void event_signal_closure(struct event_base *, struct event *ev);
144 static inline void event_persist_closure(struct event_base *, struct event *ev);
197 #define _event_debug_note_setup(ev) do { \ in HT_PROTOTYPE() argument
200 find.ptr = (ev); \ in HT_PROTOTYPE()
210 dent->ptr = (ev); \ in HT_PROTOTYPE()
219 #define _event_debug_note_teardown(ev) do { \ argument
222 find.ptr = (ev); \
232 #define _event_debug_note_add(ev) do { \ argument
235 find.ptr = (ev); \
245 __func__, (ev), (ev)->ev_events, \
246 EV_SOCK_ARG((ev)->ev_fd), (ev)->ev_flags); \
253 #define _event_debug_note_del(ev) do { \ argument
256 find.ptr = (ev); \
266 __func__, (ev), (ev)->ev_events, \
267 EV_SOCK_ARG((ev)->ev_fd), (ev)->ev_flags); \
274 #define _event_debug_assert_is_setup(ev) do { \ argument
277 find.ptr = (ev); \
285 __func__, (ev), (ev)->ev_events, \
286 EV_SOCK_ARG((ev)->ev_fd), (ev)->ev_flags); \
293 #define _event_debug_assert_not_added(ev) do { \ argument
296 find.ptr = (ev); \
304 __func__, (ev), (ev)->ev_events, \
305 EV_SOCK_ARG((ev)->ev_fd), (ev)->ev_flags); \
311 #define _event_debug_note_setup(ev) \
313 #define _event_debug_note_teardown(ev) \
315 #define _event_debug_note_add(ev) \
317 #define _event_debug_note_del(ev) \
319 #define _event_debug_assert_is_setup(ev) \
321 #define _event_debug_assert_not_added(ev) \
691 struct event *ev; in event_base_free() local
725 for (ev = TAILQ_FIRST(&base->eventqueue); ev; ) { in event_base_free()
726 struct event *next = TAILQ_NEXT(ev, ev_next); in event_base_free()
727 if (!(ev->ev_flags & EVLIST_INTERNAL)) { in event_base_free()
728 event_del(ev); in event_base_free()
731 ev = next; in event_base_free()
733 while ((ev = min_heap_top(&base->timeheap)) != NULL) { in event_base_free()
734 event_del(ev); in event_base_free()
742 for (ev = TAILQ_FIRST(&ctl->events); ev; ) { in event_base_free()
743 struct event *next = TAILQ_NEXT(ev, in event_base_free()
745 if (!(ev->ev_flags & EVLIST_INTERNAL)) { in event_base_free()
746 event_del(ev); in event_base_free()
749 ev = next; in event_base_free()
757 for (ev = TAILQ_FIRST(&base->activequeues[i]); ev; ) { in event_base_free()
758 struct event *next = TAILQ_NEXT(ev, ev_active_next); in event_base_free()
759 if (!(ev->ev_flags & EVLIST_INTERNAL)) { in event_base_free()
760 event_del(ev); in event_base_free()
763 ev = next; in event_base_free()
800 struct event *ev; in event_reinit() local
865 TAILQ_FOREACH(ev, &base->eventqueue, ev_next) { in event_reinit()
866 if (ev->ev_events & (EV_READ|EV_WRITE)) { in event_reinit()
867 if (ev == &base->sig.ev_signal) { in event_reinit()
874 if (evmap_io_add(base, ev->ev_fd, ev) == -1) in event_reinit()
876 } else if (ev->ev_events & EV_SIGNAL) { in event_reinit()
877 if (evmap_signal_add(base, (int)ev->ev_fd, ev) == -1) in event_reinit()
1049 event_signal_closure(struct event_base *base, struct event *ev) in event_signal_closure() argument
1055 ncalls = ev->ev_ncalls; in event_signal_closure()
1057 ev->ev_pncalls = &ncalls; in event_signal_closure()
1061 ev->ev_ncalls = ncalls; in event_signal_closure()
1063 ev->ev_pncalls = NULL; in event_signal_closure()
1064 (*ev->ev_callback)(ev->ev_fd, ev->ev_res, ev->ev_arg); in event_signal_closure()
1072 ev->ev_pncalls = NULL; in event_signal_closure()
1162 struct event *ev = NULL; in common_timeout_callback() local
1166 ev = TAILQ_FIRST(&ctl->events); in common_timeout_callback()
1167 if (!ev || ev->ev_timeout.tv_sec > now.tv_sec || in common_timeout_callback()
1168 (ev->ev_timeout.tv_sec == now.tv_sec && in common_timeout_callback()
1169 (ev->ev_timeout.tv_usec&MICROSECONDS_MASK) > now.tv_usec)) in common_timeout_callback()
1171 event_del_internal(ev); in common_timeout_callback()
1172 event_active_nolock(ev, EV_TIMEOUT, 1); in common_timeout_callback()
1174 if (ev) in common_timeout_callback()
1175 common_timeout_schedule(ctl, &now, ev); in common_timeout_callback()
1257 event_persist_closure(struct event_base *base, struct event *ev) in event_persist_closure() argument
1268 if (ev->ev_io_timeout.tv_sec || ev->ev_io_timeout.tv_usec) { in event_persist_closure()
1275 EVUTIL_ASSERT(is_same_common_timeout(&ev->ev_timeout, in event_persist_closure()
1276 &ev->ev_io_timeout)); in event_persist_closure()
1278 if (is_common_timeout(&ev->ev_timeout, base)) { in event_persist_closure()
1279 delay = ev->ev_io_timeout; in event_persist_closure()
1282 if (ev->ev_res & EV_TIMEOUT) { in event_persist_closure()
1283 relative_to = ev->ev_timeout; in event_persist_closure()
1289 delay = ev->ev_io_timeout; in event_persist_closure()
1290 if (ev->ev_res & EV_TIMEOUT) { in event_persist_closure()
1291 relative_to = ev->ev_timeout; in event_persist_closure()
1306 event_add_internal(ev, &run_at, 1); in event_persist_closure()
1310 evcb_callback = ev->ev_callback; in event_persist_closure()
1311 evcb_fd = ev->ev_fd; in event_persist_closure()
1312 evcb_res = ev->ev_res; in event_persist_closure()
1313 evcb_arg = ev->ev_arg; in event_persist_closure()
1333 struct event *ev; in event_process_active_single_queue() local
1338 for (ev = TAILQ_FIRST(activeq); ev; ev = TAILQ_FIRST(activeq)) { in event_process_active_single_queue()
1339 if (ev->ev_events & EV_PERSIST) in event_process_active_single_queue()
1340 event_queue_remove(base, ev, EVLIST_ACTIVE); in event_process_active_single_queue()
1342 event_del_internal(ev); in event_process_active_single_queue()
1343 if (!(ev->ev_flags & EVLIST_INTERNAL)) in event_process_active_single_queue()
1348 ev, in event_process_active_single_queue()
1349 ev->ev_res & EV_READ ? "EV_READ " : " ", in event_process_active_single_queue()
1350 ev->ev_res & EV_WRITE ? "EV_WRITE " : " ", in event_process_active_single_queue()
1351 ev->ev_callback)); in event_process_active_single_queue()
1354 base->current_event = ev; in event_process_active_single_queue()
1358 switch (ev->ev_closure) { in event_process_active_single_queue()
1360 event_signal_closure(base, ev); in event_process_active_single_queue()
1363 event_persist_closure(base, ev); in event_process_active_single_queue()
1368 (*ev->ev_callback)( in event_process_active_single_queue()
1369 ev->ev_fd, ev->ev_res, ev->ev_arg); in event_process_active_single_queue()
1660 struct event ev; member
1674 event_debug_unassign(&eonce->ev); in event_once_cb()
1714 evtimer_assign(&eonce->ev, base, event_once_cb, eonce); in event_base_once()
1718 event_assign(&eonce->ev, base, fd, events, event_once_cb, eonce); in event_base_once()
1726 res = event_add(&eonce->ev, tv); in event_base_once()
1736 event_assign(struct event *ev, struct event_base *base, evutil_socket_t fd, short events, void (*ca… in event_assign() argument
1741 _event_debug_assert_not_added(ev); in event_assign()
1743 ev->ev_base = base; in event_assign()
1745 ev->ev_callback = callback; in event_assign()
1746 ev->ev_arg = arg; in event_assign()
1747 ev->ev_fd = fd; in event_assign()
1748 ev->ev_events = events; in event_assign()
1749 ev->ev_res = 0; in event_assign()
1750 ev->ev_flags = EVLIST_INIT; in event_assign()
1751 ev->ev_ncalls = 0; in event_assign()
1752 ev->ev_pncalls = NULL; in event_assign()
1760 ev->ev_closure = EV_CLOSURE_SIGNAL; in event_assign()
1763 evutil_timerclear(&ev->ev_io_timeout); in event_assign()
1764 ev->ev_closure = EV_CLOSURE_PERSIST; in event_assign()
1766 ev->ev_closure = EV_CLOSURE_NONE; in event_assign()
1770 min_heap_elem_init(ev); in event_assign()
1774 ev->ev_pri = base->nactivequeues / 2; in event_assign()
1777 _event_debug_note_setup(ev); in event_assign()
1783 event_base_set(struct event_base *base, struct event *ev) in event_base_set() argument
1786 if (ev->ev_flags != EVLIST_INIT) in event_base_set()
1789 _event_debug_assert_is_setup(ev); in event_base_set()
1791 ev->ev_base = base; in event_base_set()
1792 ev->ev_pri = base->nactivequeues/2; in event_base_set()
1798 event_set(struct event *ev, evutil_socket_t fd, short events, in event_set() argument
1802 r = event_assign(ev, current_base, fd, events, callback, arg); in event_set()
1809 struct event *ev; in event_new() local
1810 ev = mm_malloc(sizeof(struct event)); in event_new()
1811 if (ev == NULL) in event_new()
1813 if (event_assign(ev, base, fd, events, cb, arg) < 0) { in event_new()
1814 mm_free(ev); in event_new()
1818 return (ev); in event_new()
1822 event_free(struct event *ev) in event_free() argument
1824 _event_debug_assert_is_setup(ev); in event_free()
1827 event_del(ev); in event_free()
1828 _event_debug_note_teardown(ev); in event_free()
1829 mm_free(ev); in event_free()
1834 event_debug_unassign(struct event *ev) in event_debug_unassign() argument
1836 _event_debug_assert_not_added(ev); in event_debug_unassign()
1837 _event_debug_note_teardown(ev); in event_debug_unassign()
1839 ev->ev_flags &= ~EVLIST_INIT; in event_debug_unassign()
1848 event_priority_set(struct event *ev, int pri) in event_priority_set() argument
1850 _event_debug_assert_is_setup(ev); in event_priority_set()
1852 if (ev->ev_flags & EVLIST_ACTIVE) in event_priority_set()
1854 if (pri < 0 || pri >= ev->ev_base->nactivequeues) in event_priority_set()
1857 ev->ev_pri = pri; in event_priority_set()
1867 event_pending(const struct event *ev, short event, struct timeval *tv) in event_pending() argument
1871 if (EVUTIL_FAILURE_CHECK(ev->ev_base == NULL)) { in event_pending()
1876 EVBASE_ACQUIRE_LOCK(ev->ev_base, th_base_lock); in event_pending()
1877 _event_debug_assert_is_setup(ev); in event_pending()
1879 if (ev->ev_flags & EVLIST_INSERTED) in event_pending()
1880 flags |= (ev->ev_events & (EV_READ|EV_WRITE|EV_SIGNAL)); in event_pending()
1881 if (ev->ev_flags & EVLIST_ACTIVE) in event_pending()
1882 flags |= ev->ev_res; in event_pending()
1883 if (ev->ev_flags & EVLIST_TIMEOUT) in event_pending()
1890 struct timeval tmp = ev->ev_timeout; in event_pending()
1894 evutil_timeradd(&ev->ev_base->tv_clock_diff, &tmp, tv); in event_pending()
1900 EVBASE_RELEASE_LOCK(ev->ev_base, th_base_lock); in event_pending()
1906 event_initialized(const struct event *ev) in event_initialized() argument
1908 if (!(ev->ev_flags & EVLIST_INIT)) in event_initialized()
1938 event_get_fd(const struct event *ev) in event_get_fd() argument
1940 _event_debug_assert_is_setup(ev); in event_get_fd()
1941 return ev->ev_fd; in event_get_fd()
1945 event_get_base(const struct event *ev) in event_get_base() argument
1947 _event_debug_assert_is_setup(ev); in event_get_base()
1948 return ev->ev_base; in event_get_base()
1952 event_get_events(const struct event *ev) in event_get_events() argument
1954 _event_debug_assert_is_setup(ev); in event_get_events()
1955 return ev->ev_events; in event_get_events()
1959 event_get_callback(const struct event *ev) in event_get_callback() argument
1961 _event_debug_assert_is_setup(ev); in event_get_callback()
1962 return ev->ev_callback; in event_get_callback()
1966 event_get_callback_arg(const struct event *ev) in event_get_callback_arg() argument
1968 _event_debug_assert_is_setup(ev); in event_get_callback_arg()
1969 return ev->ev_arg; in event_get_callback_arg()
1973 event_add(struct event *ev, const struct timeval *tv) in event_add() argument
1977 if (EVUTIL_FAILURE_CHECK(!ev->ev_base)) { in event_add()
1982 EVBASE_ACQUIRE_LOCK(ev->ev_base, th_base_lock); in event_add()
1984 res = event_add_internal(ev, tv, 0); in event_add()
1986 EVBASE_RELEASE_LOCK(ev->ev_base, th_base_lock); in event_add()
2045 event_add_internal(struct event *ev, const struct timeval *tv, in event_add_internal() argument
2048 struct event_base *base = ev->ev_base; in event_add_internal()
2053 _event_debug_assert_is_setup(ev); in event_add_internal()
2057 ev, in event_add_internal()
2058 EV_SOCK_ARG(ev->ev_fd), in event_add_internal()
2059 ev->ev_events & EV_READ ? "EV_READ " : " ", in event_add_internal()
2060 ev->ev_events & EV_WRITE ? "EV_WRITE " : " ", in event_add_internal()
2062 ev->ev_callback)); in event_add_internal()
2064 EVUTIL_ASSERT(!(ev->ev_flags & ~EVLIST_ALL)); in event_add_internal()
2070 if (tv != NULL && !(ev->ev_flags & EVLIST_TIMEOUT)) { in event_add_internal()
2081 if (base->current_event == ev && (ev->ev_events & EV_SIGNAL) in event_add_internal()
2088 if ((ev->ev_events & (EV_READ|EV_WRITE|EV_SIGNAL)) && in event_add_internal()
2089 !(ev->ev_flags & (EVLIST_INSERTED|EVLIST_ACTIVE))) { in event_add_internal()
2090 if (ev->ev_events & (EV_READ|EV_WRITE)) in event_add_internal()
2091 res = evmap_io_add(base, ev->ev_fd, ev); in event_add_internal()
2092 else if (ev->ev_events & EV_SIGNAL) in event_add_internal()
2093 res = evmap_signal_add(base, (int)ev->ev_fd, ev); in event_add_internal()
2095 event_queue_insert(base, ev, EVLIST_INSERTED); in event_add_internal()
2117 if (ev->ev_closure == EV_CLOSURE_PERSIST && !tv_is_absolute) in event_add_internal()
2118 ev->ev_io_timeout = *tv; in event_add_internal()
2124 if (ev->ev_flags & EVLIST_TIMEOUT) { in event_add_internal()
2126 if (min_heap_elt_is_top(ev)) in event_add_internal()
2128 event_queue_remove(base, ev, EVLIST_TIMEOUT); in event_add_internal()
2134 if ((ev->ev_flags & EVLIST_ACTIVE) && in event_add_internal()
2135 (ev->ev_res & EV_TIMEOUT)) { in event_add_internal()
2136 if (ev->ev_events & EV_SIGNAL) { in event_add_internal()
2140 if (ev->ev_ncalls && ev->ev_pncalls) { in event_add_internal()
2142 *ev->ev_pncalls = 0; in event_add_internal()
2146 event_queue_remove(base, ev, EVLIST_ACTIVE); in event_add_internal()
2153 ev->ev_timeout = *tv; in event_add_internal()
2157 evutil_timeradd(&now, &tmp, &ev->ev_timeout); in event_add_internal()
2158 ev->ev_timeout.tv_usec |= in event_add_internal()
2161 evutil_timeradd(&now, tv, &ev->ev_timeout); in event_add_internal()
2166 (int)tv->tv_sec, ev->ev_callback)); in event_add_internal()
2168 event_queue_insert(base, ev, EVLIST_TIMEOUT); in event_add_internal()
2171 get_common_timeout_list(base, &ev->ev_timeout); in event_add_internal()
2172 if (ev == TAILQ_FIRST(&ctl->events)) { in event_add_internal()
2173 common_timeout_schedule(ctl, &now, ev); in event_add_internal()
2180 if (min_heap_elt_is_top(ev)) in event_add_internal()
2189 _event_debug_note_add(ev); in event_add_internal()
2195 event_del(struct event *ev) in event_del() argument
2199 if (EVUTIL_FAILURE_CHECK(!ev->ev_base)) { in event_del()
2204 EVBASE_ACQUIRE_LOCK(ev->ev_base, th_base_lock); in event_del()
2206 res = event_del_internal(ev); in event_del()
2208 EVBASE_RELEASE_LOCK(ev->ev_base, th_base_lock); in event_del()
2215 event_del_internal(struct event *ev) in event_del_internal() argument
2221 ev, EV_SOCK_ARG(ev->ev_fd), ev->ev_callback)); in event_del_internal()
2224 if (ev->ev_base == NULL) in event_del_internal()
2227 EVENT_BASE_ASSERT_LOCKED(ev->ev_base); in event_del_internal()
2234 base = ev->ev_base; in event_del_internal()
2236 if (base->current_event == ev && !EVBASE_IN_THREAD(base)) { in event_del_internal()
2242 EVUTIL_ASSERT(!(ev->ev_flags & ~EVLIST_ALL)); in event_del_internal()
2245 if (ev->ev_events & EV_SIGNAL) { in event_del_internal()
2246 if (ev->ev_ncalls && ev->ev_pncalls) { in event_del_internal()
2248 *ev->ev_pncalls = 0; in event_del_internal()
2252 if (ev->ev_flags & EVLIST_TIMEOUT) { in event_del_internal()
2260 event_queue_remove(base, ev, EVLIST_TIMEOUT); in event_del_internal()
2263 if (ev->ev_flags & EVLIST_ACTIVE) in event_del_internal()
2264 event_queue_remove(base, ev, EVLIST_ACTIVE); in event_del_internal()
2266 if (ev->ev_flags & EVLIST_INSERTED) { in event_del_internal()
2267 event_queue_remove(base, ev, EVLIST_INSERTED); in event_del_internal()
2268 if (ev->ev_events & (EV_READ|EV_WRITE)) in event_del_internal()
2269 res = evmap_io_del(base, ev->ev_fd, ev); in event_del_internal()
2271 res = evmap_signal_del(base, (int)ev->ev_fd, ev); in event_del_internal()
2283 _event_debug_note_del(ev); in event_del_internal()
2289 event_active(struct event *ev, int res, short ncalls) in event_active() argument
2291 if (EVUTIL_FAILURE_CHECK(!ev->ev_base)) { in event_active()
2296 EVBASE_ACQUIRE_LOCK(ev->ev_base, th_base_lock); in event_active()
2298 _event_debug_assert_is_setup(ev); in event_active()
2300 event_active_nolock(ev, res, ncalls); in event_active()
2302 EVBASE_RELEASE_LOCK(ev->ev_base, th_base_lock); in event_active()
2307 event_active_nolock(struct event *ev, int res, short ncalls) in event_active_nolock() argument
2312 ev, EV_SOCK_ARG(ev->ev_fd), (int)res, ev->ev_callback)); in event_active_nolock()
2316 if (ev->ev_flags & EVLIST_ACTIVE) { in event_active_nolock()
2317 ev->ev_res |= res; in event_active_nolock()
2321 base = ev->ev_base; in event_active_nolock()
2325 ev->ev_res = res; in event_active_nolock()
2327 if (ev->ev_pri < base->event_running_priority) in event_active_nolock()
2330 if (ev->ev_events & EV_SIGNAL) { in event_active_nolock()
2332 if (base->current_event == ev && !EVBASE_IN_THREAD(base)) { in event_active_nolock()
2337 ev->ev_ncalls = ncalls; in event_active_nolock()
2338 ev->ev_pncalls = NULL; in event_active_nolock()
2341 event_queue_insert(base, ev, EVLIST_ACTIVE); in event_active_nolock()
2402 struct event *ev; in timeout_next() local
2406 ev = min_heap_top(&base->timeheap); in timeout_next()
2408 if (ev == NULL) { in timeout_next()
2419 if (evutil_timercmp(&ev->ev_timeout, &now, <=)) { in timeout_next()
2424 evutil_timersub(&ev->ev_timeout, &now, tv); in timeout_next()
2475 struct event *ev; in timeout_correct() local
2478 TAILQ_FOREACH(ev, &ctl->events, in timeout_correct()
2480 struct timeval *ev_tv = &ev->ev_timeout; in timeout_correct()
2498 struct event *ev; in timeout_process() local
2506 while ((ev = min_heap_top(&base->timeheap))) { in timeout_process()
2507 if (evutil_timercmp(&ev->ev_timeout, &now, >)) in timeout_process()
2511 event_del_internal(ev); in timeout_process()
2514 ev->ev_callback)); in timeout_process()
2515 event_active_nolock(ev, EV_TIMEOUT, 1); in timeout_process()
2521 event_queue_remove(struct event_base *base, struct event *ev, int queue) in event_queue_remove() argument
2525 if (!(ev->ev_flags & queue)) { in event_queue_remove()
2527 ev, EV_SOCK_ARG(ev->ev_fd), queue); in event_queue_remove()
2531 if (~ev->ev_flags & EVLIST_INTERNAL) in event_queue_remove()
2534 ev->ev_flags &= ~queue; in event_queue_remove()
2537 TAILQ_REMOVE(&base->eventqueue, ev, ev_next); in event_queue_remove()
2541 TAILQ_REMOVE(&base->activequeues[ev->ev_pri], in event_queue_remove()
2542 ev, ev_active_next); in event_queue_remove()
2545 if (is_common_timeout(&ev->ev_timeout, base)) { in event_queue_remove()
2547 get_common_timeout_list(base, &ev->ev_timeout); in event_queue_remove()
2548 TAILQ_REMOVE(&ctl->events, ev, in event_queue_remove()
2551 min_heap_erase(&base->timeheap, ev); in event_queue_remove()
2562 struct event *ev) in insert_common_timeout_inorder() argument
2579 is_same_common_timeout(&e->ev_timeout, &ev->ev_timeout)); in insert_common_timeout_inorder()
2580 if (evutil_timercmp(&ev->ev_timeout, &e->ev_timeout, >=)) { in insert_common_timeout_inorder()
2581 TAILQ_INSERT_AFTER(&ctl->events, e, ev, in insert_common_timeout_inorder()
2586 TAILQ_INSERT_HEAD(&ctl->events, ev, in insert_common_timeout_inorder()
2591 event_queue_insert(struct event_base *base, struct event *ev, int queue) in event_queue_insert() argument
2595 if (ev->ev_flags & queue) { in event_queue_insert()
2601 ev, EV_SOCK_ARG(ev->ev_fd), queue); in event_queue_insert()
2605 if (~ev->ev_flags & EVLIST_INTERNAL) in event_queue_insert()
2608 ev->ev_flags |= queue; in event_queue_insert()
2611 TAILQ_INSERT_TAIL(&base->eventqueue, ev, ev_next); in event_queue_insert()
2615 TAILQ_INSERT_TAIL(&base->activequeues[ev->ev_pri], in event_queue_insert()
2616 ev,ev_active_next); in event_queue_insert()
2619 if (is_common_timeout(&ev->ev_timeout, base)) { in event_queue_insert()
2621 get_common_timeout_list(base, &ev->ev_timeout); in event_queue_insert()
2622 insert_common_timeout_inorder(ctl, ev); in event_queue_insert()
2624 min_heap_push(&base->timeheap, ev); in event_queue_insert()
2920 struct event *ev, *p_ev; in event_base_assert_ok() local
2921 ev = base->timeheap.p[i]; in event_base_assert_ok()
2923 EVUTIL_ASSERT(ev->ev_flags & EV_TIMEOUT); in event_base_assert_ok()
2924 EVUTIL_ASSERT(evutil_timercmp(&p_ev->ev_timeout, &ev->ev_timeout, <=)); in event_base_assert_ok()
2925 EVUTIL_ASSERT(ev->ev_timeout_pos.min_heap_idx == i); in event_base_assert_ok()
2931 struct event *last=NULL, *ev; in event_base_assert_ok() local
2932 TAILQ_FOREACH(ev, &ctl->events, ev_timeout_pos.ev_next_with_common_timeout) { in event_base_assert_ok()
2934 EVUTIL_ASSERT(evutil_timercmp(&last->ev_timeout, &ev->ev_timeout, <=)); in event_base_assert_ok()
2935 EVUTIL_ASSERT(ev->ev_flags & EV_TIMEOUT); in event_base_assert_ok()
2936 EVUTIL_ASSERT(is_common_timeout(&ev->ev_timeout,base)); in event_base_assert_ok()
2937 EVUTIL_ASSERT(COMMON_TIMEOUT_IDX(&ev->ev_timeout) == i); in event_base_assert_ok()
2938 last = ev; in event_base_assert_ok()