]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: debug: remove unused case of thr!=tid in ha_thread_dump_one()
authorWilly Tarreau <w@1wt.eu>
Thu, 10 Apr 2025 07:03:05 +0000 (09:03 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 17 Apr 2025 14:25:47 +0000 (16:25 +0200)
commit5ac739cd0c9deb52774fdc07cb5330edf668668a
treed84fdf2557d45629ed8a69aa370137df44c20885
parent5646ec4d40cd102733da12a6a2d191434b33060a
MINOR: debug: remove unused case of thr!=tid in ha_thread_dump_one()

This function was initially designed to dump any threadd into the presented
buffer, but the way it currently works is that it's always called for the
current thread, and uses the distinction between coming from a sighandler
or being called directly to detect which thread is the caller.

Let's simplify all this by replacing thr with tid everywhere, and using
the thread-local pointers where it makes sense (e.g. th_ctx, th_ctx etc).
The confusing "from_signal" argument is now replaced with "is_caller"
which clearly states whether or not the caller declares being the one
asking for the dump (the logic is inverted, but there are only two call
places with a constant).
include/haproxy/debug.h
src/debug.c