mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Allowing to send events to the metaloop's priority list
This commit is contained in:
@@ -1396,6 +1396,7 @@ birdloop_init(void)
|
||||
timers_init(&main_birdloop.time, &root_pool);
|
||||
|
||||
birdloop_enter_locked(&main_birdloop);
|
||||
this_thread = &main_thread;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1689,3 +1690,12 @@ birdloop_yield(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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user