/* Get birdloop's event list */
event_list *birdloop_event_list(struct birdloop *loop);
+/* Run this event in this thread's priority event list */
+void ev_send_this_thread(event *e);
+
/* Get birdloop's time heap */
struct timeloop *birdloop_time_loop(struct birdloop *loop);
#define birdloop_domain(l) (birdloop_time_loop((l))->domain)
timers_init(&main_birdloop.time, &root_pool);
birdloop_enter_locked(&main_birdloop);
+ this_thread = &main_thread;
}
static void
{
usleep(100);
}
+
+void
+ev_send_this_thread(event *e)
+{
+ if (this_thread == &main_thread)
+ ev_send_loop(&main_birdloop, e);
+ else
+ ev_send(&this_thread->priority_events, e);
+}