diff --git a/include/haproxy/debug.h b/include/haproxy/debug.h index 7bfd12ed6..226108acc 100644 --- a/include/haproxy/debug.h +++ b/include/haproxy/debug.h @@ -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); diff --git a/src/debug.c b/src/debug.c index 39a6e0231..3fa2845ce 100644 --- a/src/debug.c +++ b/src/debug.c @@ -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 . diff --git a/src/wdt.c b/src/wdt.c index 4e9b7c3ad..9f5b81729 100644 --- a/src/wdt.c +++ b/src/wdt.c @@ -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