};
/* Global state; deprecated */
-struct event_base *current_base = NULL;
+struct event_base *event_global_current_base_ = NULL;
+#define current_base event_global_current_base_
+extern struct event_base *evsig_base;
/* Global state */
-extern struct event_base *evsig_base;
+
static int use_monotonic;
/* Prototypes */
/**
Initialize the event API.
- Use event_base_new() to initialize a new event base, but does not set
- the current_base global. If using only event_base_new(), each event
- added must have an event base set with event_base_set()
+ Use event_base_new() to initialize a new event base.
- @see event_base_set(), event_base_free(), event_init(),
+ @see event_base_set(), event_base_free(),
event_base_new_with_config()
*/
struct event_base *event_base_new(void);
Initialize the event API.
The event API needs to be initialized with event_init() before it can be
- used. Sets the current_base global representing the default base for
- events that have no base associated with them.
+ used. Sets the global current base that gets used for events that have no
+ base associated with them.
@deprecated This function is deprecated because it replaces the "current"
event_base, and is totally unsafe for multithreaded use. The replacement
#ifndef WIN32
static void signal_cb(evutil_socket_t fd, short event, void *arg);
+#define current_base event_global_current_base_
extern struct event_base *current_base;
static void