In order to replace the global "all_threads_mask" we'll need to have an
equivalent per group. Take this opportunity for calling it threads_enabled
and make sure which ones are counted there (in case in the future we allow
to stop some).
* at 1 so tgroup[0] describes thread group 1.
*/
struct tgroup_info {
+ ulong threads_enabled; /* mask of threads enabled in this group */
uint base; /* first thread in this group */
uint count; /* number of threads in this group */
ulong tgid_bit; /* bit corresponding to the tgroup ID */
ptff->fct();
#ifdef USE_THREAD
+ _HA_ATOMIC_AND(&ha_tgroup_info[ti->tgid].threads_enabled, ~ti->ltid_bit);
_HA_ATOMIC_AND(&all_threads_mask, ~tid_bit);
if (tid > 0)
pthread_exit(NULL);
ha_thread_info[t].ltid_bit = 1UL << ha_thread_info[t].ltid;
}
+ for (g = 0; g < global.nbtgroups; g++) {
+ ha_tgroup_info[g].threads_enabled = nbits(ha_tgroup_info[g].count);
+
+ }
+
return 0;
}