/** Mapping from signal numbers to enabled (added) events. */
struct event_signal_map sigmap;
-#ifdef _EVENT_USE_EVENTLIST
- /** All events that have been enabled (added) in this event_base */
- struct event_list eventqueue;
-#endif
-
/** Stored timeval; used to detect when time is running backwards. */
struct timeval event_tv;
gettime(base, &base->event_tv);
min_heap_ctor(&base->timeheap);
-#ifdef _EVENT_USE_EVENTLIST
- TAILQ_INIT(&base->eventqueue);
-#endif
+
base->sig.ev_signal_pair[0] = -1;
base->sig.ev_signal_pair[1] = -1;
base->th_notify_fd[0] = -1;
mm_free(base->activequeues);
-#ifdef _EVENT_USE_EVENTLIST
- EVUTIL_ASSERT(TAILQ_EMPTY(&base->eventqueue));
-#endif
-
evmap_io_clear(&base->io);
evmap_signal_clear(&base->sigmap);
event_changelist_freemem(&base->changelist);
}
DECR_EVENT_COUNT(base, ev);
ev->ev_flags &= ~EVLIST_INSERTED;
-#ifdef _EVENT_USE_EVENTLIST
- TAILQ_REMOVE(&base->eventqueue, ev, ev_next);
-#endif
}
static void
event_queue_remove_active(struct event_base *base, struct event *ev)
INCR_EVENT_COUNT(base, ev);
ev->ev_flags |= EVLIST_INSERTED;
-
-#ifdef _EVENT_USE_EVENTLIST
- TAILQ_INSERT_TAIL(&base->eventqueue, ev, ev_next);
-#endif
}
static void
struct event_base;
struct event {
TAILQ_ENTRY(event) ev_active_next;
-#ifdef _EVENT_USE_EVENTLIST
- TAILQ_ENTRY(event) ev_next;
-#endif
+
/* for managing timeouts */
union {
TAILQ_ENTRY(event) ev_next_with_common_timeout;