]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: fd: add fd_reregister_all() to deal with boot-time FDs
authorWilly Tarreau <w@1wt.eu>
Sat, 9 Jul 2022 21:19:19 +0000 (23:19 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 Jul 2022 18:16:30 +0000 (20:16 +0200)
commit88c4c14050451858f1f3cb0169ae900b97e900c4
treeef803e341cf9d41c8bb91476a11a7e9e0598ee3d
parentd0b73bca714d5eea02f4283c3c584b36bbebaedc
MINOR: fd: add fd_reregister_all() to deal with boot-time FDs

At boot the pollers are allocated for each thread and they need to
reprogram updates for all FDs they will manage. This code is not
trivial, especially when trying to respect thread groups, so we'd
rather avoid duplicating it.

Let's centralize this into fd.c with this function. It avoids closed
FDs, those whose thread mask doesn't match the requested one or whose
thread group doesn't match the requested one, and performs the update
if required under thread-group protection.
include/haproxy/fd.h
src/fd.c