mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-01-03 07:31:54 +00:00
Task-in-limit checker hacked for mainloop
This commit is contained in:
parent
d7cf378003
commit
4bca3b9f86
@ -1358,7 +1358,11 @@ cmd_show_threads(int show_loops)
|
|||||||
|
|
||||||
_Bool task_still_in_limit(void)
|
_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)
|
_Bool task_before_halftime(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user