]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: debug: re-export thread_dump_state
authorWilly Tarreau <w@1wt.eu>
Fri, 1 Jul 2022 19:18:03 +0000 (21:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Jul 2022 19:18:03 +0000 (21:18 +0200)
Building with threads and without thread dump (e.g. macos, freebsd)
warns that thread_dump_state is unused. This happened in fact with
recentcommit 1229ef312 ("MINOR: wdt: do not rely on threads_to_dump
anymore"). The solution would be to mark it unused, but after a
second thought, it can be convenient to keep it exported to help
debug crashes, so let's export it again. It's just not referenced in
include files since it's not needed outside.

src/debug.c

index 23b72b62f07b625825e4f91027e6f09ee97d5de1..8d6210828ff7009da4319f2b615c2b31b7931396 100644 (file)
@@ -54,7 +54,7 @@
  * adds 1<<16 and sets the lowest 15 bits to the ID of the next thread to
  * dump + 1. Only used when USE_THREAD_DUMP is set.
  */
-static volatile unsigned int thread_dump_state = 0;
+volatile unsigned int thread_dump_state = 0;
 unsigned int debug_commands_issued = 0;
 
 /* dumps a backtrace of the current thread that is appended to buffer <buf>.