current_base->evsel->name);
/* allocate a single active event queue */
- event_priority_init(current_base, 1);
+ event_base_priority_init(current_base, 1);
return (current_base);
}
int
-event_priority_init(struct event_base *base, int npriorities)
+event_priority_init(int npriorities)
+{
+ return event_base_priority_init(current_base, npriorities);
+}
+
+int
+event_base_priority_init(struct event_base *base, int npriorities)
{
int i;
return (event_loop(0));
}
+int
+event_base_dispatch(struct event_base *event_base)
+{
+ return (event_base_loop(event_base, 0));
+}
+
static void
event_loopexit_cb(int fd, short what, void *arg)
{
int
event_loop(int flags)
{
- return event_loop_base(current_base, flags);
+ return event_base_loop(current_base, flags);
}
int
-event_loop_base(struct event_base *base, int flags)
+event_base_loop(struct event_base *base, int flags)
{
const struct eventop *evsel = base->evsel;
void *evbase = base->evbase;
void *event_init(void);
int event_dispatch(void);
+int event_base_dispatch(struct event_base *);
#define EVLOOP_ONCE 0x01
#define EVLOOP_NONBLOCK 0x02
int event_loop(int);
-int event_loop_base(struct event_base *, int);
+int event_base_loop(struct event_base *, int);
int event_loopexit(struct timeval *); /* Causes the loop to exit */
#define evtimer_add(ev, tv) event_add(ev, tv)
/* These functions deal with event priorities */
-int event_priority_init(struct event_base *, int);
+int event_priority_init(int);
+int event_base_priority_init(struct event_base *, int);
int event_priority_set(struct event *, int);
/* These functions deal with buffering input and output */
snprintf(buf, sizeof(buf), "Priorities %d: ", npriorities);
setup_test(buf);
- event_priority_init(event_base, npriorities);
+ event_base_priority_init(event_base, npriorities);
memset(&one, 0, sizeof(one));
memset(&two, 0, sizeof(two));