mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-05 21:16:09 +02:00
MINOR: threads: Eliminate all_tgroups_mask.
Now that it is unused, eliminate all_tgroups_mask, as we can't 64bits masks to represent thread groups, if we want to be able to have more than 64 thread groups.
This commit is contained in:
parent
7e1fed4b7a
commit
1397982599
@ -60,7 +60,6 @@ extern int thread_cpus_enabled_at_boot;
|
||||
/* Only way found to replace variables with constants that are optimized away
|
||||
* at build time.
|
||||
*/
|
||||
enum { all_tgroups_mask = 1UL };
|
||||
enum { tid_bit = 1UL };
|
||||
enum { tid = 0 };
|
||||
enum { tgid = 1 };
|
||||
@ -208,7 +207,6 @@ void wait_for_threads_completion();
|
||||
void set_thread_cpu_affinity();
|
||||
unsigned long long ha_get_pthread_id(unsigned int thr);
|
||||
|
||||
extern volatile unsigned long all_tgroups_mask;
|
||||
extern volatile unsigned int rdv_requests;
|
||||
extern volatile unsigned int isolated_thread;
|
||||
extern THREAD_LOCAL unsigned int tid; /* The thread id */
|
||||
|
||||
@ -3127,8 +3127,7 @@ void *run_thread_poll_loop(void *data)
|
||||
ptff->fct();
|
||||
|
||||
#ifdef USE_THREAD
|
||||
if (!_HA_ATOMIC_AND_FETCH(&ha_tgroup_info[ti->tgid-1].threads_enabled, ~ti->ltid_bit))
|
||||
_HA_ATOMIC_AND(&all_tgroups_mask, ~tg->tgid_bit);
|
||||
_HA_ATOMIC_AND(&ha_tgroup_info[ti->tgid-1].threads_enabled, ~ti->ltid_bit);
|
||||
_HA_ATOMIC_AND_FETCH(&tg_ctx->stopping_threads, ~ti->ltid_bit);
|
||||
if (tid > 0)
|
||||
pthread_exit(NULL);
|
||||
|
||||
@ -60,7 +60,6 @@ THREAD_LOCAL struct thread_ctx *th_ctx = &ha_thread_ctx[0];
|
||||
|
||||
#ifdef USE_THREAD
|
||||
|
||||
volatile unsigned long all_tgroups_mask __read_mostly = 1; // nbtgroup 1 assumed by default
|
||||
volatile unsigned int rdv_requests = 0; // total number of threads requesting RDV
|
||||
volatile unsigned int isolated_thread = ~0; // ID of the isolated thread, or ~0 when none
|
||||
THREAD_LOCAL unsigned int tgid = 1; // thread ID starts at 1
|
||||
@ -1495,9 +1494,6 @@ int thread_map_to_groups()
|
||||
|
||||
}
|
||||
|
||||
#ifdef USE_THREAD
|
||||
all_tgroups_mask = m;
|
||||
#endif
|
||||
|
||||
#if defined(USE_THREAD) && defined(USE_CPU_AFFINITY)
|
||||
if (global.tune.debug & GDBG_CPU_AFFINITY) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user