1 #include <event2/event.h>
2 #include <event2/thread.h>
5 #include <tid_internal.h>
9 /* Allocate and set up the event base, return a pointer
10 * to the new event_base or NULL on failure.
11 * Enables thread-safe mode. */
12 struct event_base *tr_event_loop_init(void)
14 struct event_base *base=NULL;
16 evthread_use_pthreads(); /* enable pthreads support */
17 base=event_base_new();
21 /* run the loop, does not normally return */
22 int tr_event_loop_run(struct event_base *base)
24 return event_base_dispatch(base);