mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-01-15 22:01:01 +01:00
In the configuration sometimes we'll omit a thread group number to designate a global thread number range, and sometimes we'll mention the group and designate IDs within that group. The operation is more complex than it seems due to the need to check for ranges spanning between multiple groups and determining groups from threads from bit masks and remapping bit masks between local/global. This patch adds a function to perform this operation, it takes a group and mask on input and updates them on output. It's designed to be used by "bind" lines but will likely be usable at other places if needed. For situations where specified threads do not exist in the group, we have the choice in the code between silently fixing the thread set or failing with a message. For now the better option seems to return an error, but if it turns out to be an issue we can easily change that in the future. Note that it should only happen with "x/even" when group x only has one thread.