mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Remove the last vestiges of _EVENT_USE_EVENTLIST
This commit is contained in:
parent
8dbcf8d62b
commit
a3cec90961
@ -233,11 +233,6 @@ struct event_base {
|
|||||||
/** Mapping from signal numbers to enabled (added) events. */
|
/** Mapping from signal numbers to enabled (added) events. */
|
||||||
struct event_signal_map sigmap;
|
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. */
|
/** Stored timeval; used to detect when time is running backwards. */
|
||||||
struct timeval event_tv;
|
struct timeval event_tv;
|
||||||
|
|
||||||
|
15
event.c
15
event.c
@ -588,9 +588,7 @@ event_base_new_with_config(const struct event_config *cfg)
|
|||||||
gettime(base, &base->event_tv);
|
gettime(base, &base->event_tv);
|
||||||
|
|
||||||
min_heap_ctor(&base->timeheap);
|
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[0] = -1;
|
||||||
base->sig.ev_signal_pair[1] = -1;
|
base->sig.ev_signal_pair[1] = -1;
|
||||||
base->th_notify_fd[0] = -1;
|
base->th_notify_fd[0] = -1;
|
||||||
@ -815,10 +813,6 @@ event_base_free(struct event_base *base)
|
|||||||
|
|
||||||
mm_free(base->activequeues);
|
mm_free(base->activequeues);
|
||||||
|
|
||||||
#ifdef _EVENT_USE_EVENTLIST
|
|
||||||
EVUTIL_ASSERT(TAILQ_EMPTY(&base->eventqueue));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
evmap_io_clear(&base->io);
|
evmap_io_clear(&base->io);
|
||||||
evmap_signal_clear(&base->sigmap);
|
evmap_signal_clear(&base->sigmap);
|
||||||
event_changelist_freemem(&base->changelist);
|
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);
|
DECR_EVENT_COUNT(base, ev);
|
||||||
ev->ev_flags &= ~EVLIST_INSERTED;
|
ev->ev_flags &= ~EVLIST_INSERTED;
|
||||||
#ifdef _EVENT_USE_EVENTLIST
|
|
||||||
TAILQ_REMOVE(&base->eventqueue, ev, ev_next);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
static void
|
static void
|
||||||
event_queue_remove_active(struct event_base *base, struct event *ev)
|
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);
|
INCR_EVENT_COUNT(base, ev);
|
||||||
|
|
||||||
ev->ev_flags |= EVLIST_INSERTED;
|
ev->ev_flags |= EVLIST_INSERTED;
|
||||||
|
|
||||||
#ifdef _EVENT_USE_EVENTLIST
|
|
||||||
TAILQ_INSERT_TAIL(&base->eventqueue, ev, ev_next);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -96,9 +96,7 @@ struct { \
|
|||||||
struct event_base;
|
struct event_base;
|
||||||
struct event {
|
struct event {
|
||||||
TAILQ_ENTRY(event) ev_active_next;
|
TAILQ_ENTRY(event) ev_active_next;
|
||||||
#ifdef _EVENT_USE_EVENTLIST
|
|
||||||
TAILQ_ENTRY(event) ev_next;
|
|
||||||
#endif
|
|
||||||
/* for managing timeouts */
|
/* for managing timeouts */
|
||||||
union {
|
union {
|
||||||
TAILQ_ENTRY(event) ev_next_with_common_timeout;
|
TAILQ_ENTRY(event) ev_next_with_common_timeout;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user