MINOR: threads: introduce a minimalistic notion of thread-group
authorWilly Tarreau <w@1wt.eu>
Mon, 13 Sep 2021 16:11:26 +0000 (18:11 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 8 Oct 2021 15:22:26 +0000 (17:22 +0200)
commitf9662848f22bac1f8a10ac6a28e7bb39b0ae94a0
treed5082c23a83801d79291b317001fdcb7ab755f8a
parent6036342f58bb350e4d95cb63d1567439b71165b7
MINOR: threads: introduce a minimalistic notion of thread-group

This creates a struct tgroup_info which knows the thread ID of the first
thread in a group, and the number of threads in it. For now there's only
one thread group supported in the configuration, but it may be forced to
other values for development purposes by defining MAX_TGROUPS, and it's
enabled even when threads are disabled and will need to remain accessible
during boot to keep a simple enough internal API.

For the purpose of easing the configurations which do not specify a thread
group, we're starting group numbering at 1 so that thread group 0 can be
"undefined" (i.e. for "bind" lines or when binding tasks).

The goal will be to later move there some global items that must be
made per-group.
include/haproxy/defaults.h
include/haproxy/tinfo-t.h
include/haproxy/tinfo.h
src/thread.c