0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00

Task-in-limit checker hacked for mainloop

This commit is contained in:
Maria Matejka 2024-06-08 23:43:37 +02:00
parent d7cf378003
commit 4bca3b9f86

View File

@ -1358,7 +1358,11 @@ cmd_show_threads(int show_loops)
_Bool task_still_in_limit(void)
{
return ns_now() < account_last + this_thread->max_loop_time_ns;
static u64 main_counter = 0;
if (this_birdloop == &main_birdloop)
return (++main_counter % 2048); /* This is a hack because of no accounting in mainloop */
else
return ns_now() < account_last + this_thread->max_loop_time_ns;
}
_Bool task_before_halftime(void)