]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: debug: make the thread dumper not rely on a thread mask anymore
authorWilly Tarreau <w@1wt.eu>
Fri, 1 Jul 2022 17:08:56 +0000 (19:08 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Jul 2022 17:31:39 +0000 (19:31 +0200)
commit00c27b50c00f224a384c254d4af346013c1e7a01
treecec894946237877e4d37c734b3fbbc317834a50f
parent1229ef312d2155adcb359931b5fa6ca565033701
MEDIUM: debug: make the thread dumper not rely on a thread mask anymore

The thread mask is too short to dump more than 64 bits. Thus here we're
using a different approach with two counters, one for the next thread ID
to dump (which always exists, as it's looked up), and the second one for
the number of threads done dumping. This allows to dump threads in ascending
order then to let them wait for all others to be done, then to leave without
the risk of an overlapping dump until the done count is null again.

This allows to remove threads_to_dump which was the last non-FD variable
using a global thread mask.
src/debug.c