diff --git a/event-internal.h b/event-internal.h index 56f1750b..bce9c386 100644 --- a/event-internal.h +++ b/event-internal.h @@ -233,11 +233,6 @@ struct event_base { /** 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; diff --git a/event.c b/event.c index 5a54a9f4..bdcb8cd7 100644 --- a/event.c +++ b/event.c @@ -588,9 +588,7 @@ event_base_new_with_config(const struct event_config *cfg) 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; @@ -815,10 +813,6 @@ event_base_free(struct event_base *base) 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); @@ -2629,9 +2623,6 @@ event_queue_remove_inserted(struct event_base *base, struct event *ev) } 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) @@ -2735,10 +2726,6 @@ event_queue_insert_inserted(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 diff --git a/include/event2/event_struct.h b/include/event2/event_struct.h index d3ca44d4..2da11e2f 100644 --- a/include/event2/event_struct.h +++ b/include/event2/event_struct.h @@ -96,9 +96,7 @@ struct { \ 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;