MINOR: wdt: do not rely on threads_to_dump anymore

This flag is not needed anymore as we're already marking the waiting
threads as harmless, thus the thread's bit is already covered by this
information. The variable was unexported.
This commit is contained in:
Willy Tarreau 2022-07-01 17:26:15 +02:00
parent f7afdd910b
commit 1229ef312d
3 changed files with 2 additions and 3 deletions

View File

@ -24,7 +24,6 @@
struct task;
struct buffer;
extern volatile unsigned long threads_to_dump;
extern unsigned int debug_commands_issued;
void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx);
void ha_thread_dump(struct buffer *buf, int thr, int calling_tid);

View File

@ -50,7 +50,7 @@
/* mask of threads still having to dump, used to respect ordering. Only used
* when USE_THREAD_DUMP is set.
*/
volatile unsigned long threads_to_dump = 0;
static volatile unsigned long threads_to_dump = 0;
unsigned int debug_commands_issued = 0;
/* dumps a backtrace of the current thread that is appended to buffer <buf>.

View File

@ -84,7 +84,7 @@ void wdt_handler(int sig, siginfo_t *si, void *arg)
goto update_and_leave;
if ((_HA_ATOMIC_LOAD(&th_ctx->flags) & TH_FL_SLEEPING) &&
((_HA_ATOMIC_LOAD(&ha_tgroup_ctx[tgrp-1].threads_harmless) | threads_to_dump) & thr_bit)) {
(_HA_ATOMIC_LOAD(&ha_tgroup_ctx[tgrp-1].threads_harmless) & thr_bit)) {
/* This thread is currently doing exactly nothing
* waiting in the poll loop (unlikely but possible),
* waiting for all other threads to join the rendez-vous