diff --git a/include/haproxy/tinfo-t.h b/include/haproxy/tinfo-t.h index bbba5a1db..5f0d79426 100644 --- a/include/haproxy/tinfo-t.h +++ b/include/haproxy/tinfo-t.h @@ -54,7 +54,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) */ + ulong tgid_bit; /* bit corresponding to the tgroup ID */ /* pad to cache line (64B) */ char __pad[0]; /* unused except to check remaining room */ diff --git a/src/thread.c b/src/thread.c index c5f06038f..dedde13b4 100644 --- a/src/thread.c +++ b/src/thread.c @@ -1019,7 +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; + ha_tgroup_info[g].tgid_bit = 1UL << g; } if (ug > ut) {