MINOR: threads: make tg point to the current thread's group
authorWilly Tarreau <w@1wt.eu>
Tue, 28 Sep 2021 06:58:49 +0000 (08:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 8 Oct 2021 15:22:26 +0000 (17:22 +0200)
commitfc69e410e605677be567ee43464424ad9336840f
treeb4eb39f7909170f4a3843c791493df78bc036c11
parentd04bc3ac214038ba42a459f93d2330f26f53475a
MINOR: threads: make tg point to the current thread's group

A the "tg" thread-local variable now always points to the current
thread group. It's pre-initializd to the first one during boot and is
set to point to the thread's one by ha_set_tid(). This last one takes
care of checking whether the thread group was assigned or not because
it may be called during boot before threads are initialized.
include/haproxy/thread.h