diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-01-27 16:35:04 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-01-27 16:35:04 -0500 |
commit | 604569bf3f57bd7bc91799083e8a3c6016be863c (patch) | |
tree | 09428ea38eba1051b574037d8e4c995f20696108 /event-internal.h | |
parent | 7622d2659b2fc2d22ebf87be237ea590aee7191a (diff) | |
download | libevent-604569bf3f57bd7bc91799083e8a3c6016be863c.tar.gz |
Remove the eventqueue list and the ev_next pointers.
Those pointers were once used to maintain a complete list of
inserted IO and signal events. But such a list is now available by
walking over ev_io_map and ev_signal_map! So all they did was
require extra pointer operations to maintain, and extra 8-16 bytes
of storage in each struct event.
To be cowardly and keep the option of going back to having this
redundancy, I'm wrapping the removed code in a set of ifdefs.
This is a first cut; it needs cleanups and stress-testing!! In
particular, it just plain disables a couple of functions that could
probably be saved.
There seems to be a need for an evmap_{io,signal}_foreach() or something.
Diffstat (limited to 'event-internal.h')
-rw-r--r-- | event-internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/event-internal.h b/event-internal.h index 754ef759..c88ab796 100644 --- a/event-internal.h +++ b/event-internal.h @@ -232,8 +232,10 @@ 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; |