diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-04-28 11:51:56 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-04-28 12:20:18 -0400 |
commit | cb6707405cc07e34925e9c9f81a0c4d34ef9b135 (patch) | |
tree | 8c21dcff659dc619d382c36640f4047529ba0e63 /event-internal.h | |
parent | a5208fe4228b0e2c77d43dd2e3991f2fbac9148a (diff) | |
download | libevent-cb6707405cc07e34925e9c9f81a0c4d34ef9b135.tar.gz |
Make debug mode catch mixed ET and non-ET events on an fd
Of the backends that support edge-triggered IO, most (all?) do not
support attempts to mix edge-triggered and level-triggered IO on the
same FD. With debugging mode enabled, we now detect and refuse attempts
to add a level-triggered IO event to an fd that already has an
edge-triggered IO event, and vice versa.
Diffstat (limited to 'event-internal.h')
-rw-r--r-- | event-internal.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/event-internal.h b/event-internal.h index f9de18ad..7388a597 100644 --- a/event-internal.h +++ b/event-internal.h @@ -158,6 +158,9 @@ struct event_changelist { #ifndef _EVENT_DISABLE_DEBUG_MODE /* Global internal flag: set to one if debug mode is on. */ extern int _event_debug_mode_on; +#define EVENT_DEBUG_MODE_IS_ON() (_event_debug_mode_on) +#else +#define EVENT_DEBUG_MODE_IS_ON() (0) #endif struct event_base { |