mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 04:31:49 +02:00
In order to permit to migrate FDs from one thread group to another, we'll need to be able to set a TGID that is compatible with no other thread group. Either we use a special value or we dedicate a special bit. Given that we already have way more bits than needed, let's just sacrifice the topmost one to serve as a lock bit, indicating the tgid is not valid anymore. This will make all fd_grab_tgid() fail to grab it. The new fd_lock_tgid() function now tries to assign a locked tgid to an idle FD, and fd_unlock_tgid() simply drops the lock bit, revealing the target tgid. For now it's still unused so it must not have any effect.