c637d94387dc1ac0c1cedea51eda75e7a88be537
[trust_router.git] / tr / tr_event.c
1 #include <event2/event.h>
2
3 #include <tr.h>
4 #include <tid_internal.h>
5 #include <tr_debug.h>
6 #include <tr_event.h>
7
8 /* Allocate and set up the event base, return a pointer
9  * to the new event_base or NULL on failure.
10  * Does not currently enable thread-safe mode. */
11 struct event_base *tr_event_loop_init(void)
12 {
13   struct event_base *base=NULL;
14
15   base=event_base_new();
16   return base;
17 }
18
19 /* run the loop, does not normally return */
20 int tr_event_loop_run(struct event_base *base)
21 {
22   return event_base_dispatch(base);
23 }