]> git.proxmox.com Git - mirror_frr.git/commit - lib/thread.h
lib: Reduce getrusage/monotime for event handling
authorDonald Sharp <sharpd@nvidia.com>
Thu, 18 Feb 2021 00:58:19 +0000 (19:58 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 22 Feb 2021 14:20:33 +0000 (09:20 -0500)
commit5e8229578a96abb7cdfb24b5d7c8756b60793880
tree270edfcf876aa1b65686c8a0523fdb0e7e270b70
parentb6be812717a1335852d311990f13ce9c9a809b99
lib: Reduce getrusage/monotime for event handling

When handling a large number of events at one time
FRR will call monotime and getrusage 2 times for each
event.  With this change modify the code to change
this to (X events / 2) + 1 calls of getrusage and monotime

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
lib/thread.c
lib/thread.h