mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-29 01:22:53 +00:00
MINOR: threads: set the group ID and its bit in the thread group
This will ease the reporting of the current thread group ID when coming from the thread itself, especially since it returns the visible ID, starting at 1.
This commit is contained in:
parent
e6806ebecc
commit
6eee85f887
@ -46,6 +46,7 @@ enum {
|
||||
struct tgroup_info {
|
||||
uint base; /* first thread in this group */
|
||||
uint count; /* number of threads in this group */
|
||||
uint tgid; /* group ID (starts at 1, 0=unspecified) */
|
||||
|
||||
/* pad to cache line (64B) */
|
||||
char __pad[0]; /* unused except to check remaining room */
|
||||
|
@ -1019,6 +1019,7 @@ int thread_map_to_groups()
|
||||
for (g = 0; g < global.nbtgroups; g++) {
|
||||
if (!ha_tgroup_info[g].count)
|
||||
ug++;
|
||||
ha_tgroup_info[g].tgid = g + 1;
|
||||
}
|
||||
|
||||
if (ug > ut) {
|
||||
|
Loading…
Reference in New Issue
Block a user