1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Converting the former BFD loop to a universal IO loop and protocol loop.

There is a simple universal IO loop, taking care of events, timers and
sockets. Primarily, one instance of a protocol should use exactly one IO
loop to do all its work, as is now done in BFD.

Contrary to previous versions, the loop is now launched and cleaned by
the nest/proto.c code, allowing for a protocol to just request its own
loop by setting the loop's lock order in config higher than the_bird.

It is not supported nor checked if any protocol changed the requested
lock order in reconfigure. No protocol should do it at all.
This commit is contained in:
Maria Matejka
2021-06-19 20:50:18 +02:00
parent c84ed60371
commit 94eb0858c2
32 changed files with 783 additions and 445 deletions

View File

@@ -908,10 +908,12 @@ main(int argc, char **argv)
parse_args(argc, argv);
log_switch(1, NULL, NULL);
the_bird_lock();
random_init();
net_init();
resource_init();
timer_init();
birdloop_init();
olock_init();
io_init();
rt_init();
@@ -961,7 +963,6 @@ main(int argc, char **argv)
dup2(0, 2);
}
the_bird_lock();
main_thread_init();