From 39cb04335f9fd5c3268c808bac549f531fe389a3 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 3 Oct 2017 11:09:44 -0400 Subject: Add wrappers for event_base_loopexit and event_base_loopbreak. --- src/common/compat_libevent.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/common/compat_libevent.h') diff --git a/src/common/compat_libevent.h b/src/common/compat_libevent.h index 711c3a2ebe..86bc77ba5f 100644 --- a/src/common/compat_libevent.h +++ b/src/common/compat_libevent.h @@ -45,9 +45,6 @@ void mainloop_event_free_(mainloop_event_t *event); #define mainloop_event_free(event) \ FREE_AND_NULL(mainloop_event_t, mainloop_event_free_, (event)) -#define tor_event_base_loopexit event_base_loopexit -#define tor_event_base_loopbreak event_base_loopbreak - /** Defines a configuration for using libevent with Tor: passed as an argument * to tor_libevent_initialize() to describe how we want to set up. */ typedef struct tor_libevent_cfg { @@ -75,6 +72,10 @@ void tor_gettimeofday_cache_set(const struct timeval *tv); void tor_libevent_postfork(void); #endif +void tor_libevent_exit_loop_after_delay(struct event_base *base, + const struct timeval *delay); +void tor_libevent_exit_loop_after_callback(struct event_base *base); + #ifdef COMPAT_LIBEVENT_PRIVATE /** Macro: returns the number of a Libevent version as a 4-byte number, -- cgit v1.2.3-54-g00ecf