]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: pass a valid buffer pointer to ha_thread_dump_one()
authorWilly Tarreau <w@1wt.eu>
Wed, 16 Apr 2025 14:48:13 +0000 (16:48 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 17 Apr 2025 14:25:47 +0000 (16:25 +0200)
commitb24d7f248e4aeaa154cd9527061c6d98af629c86
tree04a989f18d4b8f1be83d30602ee605fb7e02a3c2
parent5ac739cd0c9deb52774fdc07cb5330edf668668a
MINOR: pass a valid buffer pointer to ha_thread_dump_one()

The goal is to let the caller deal with the pointer so that the function
only has to fill that buffer without worrying about locking. This way,
synchronous dumps from "show threads" are produced and emitted directly
without causing undesired locking of the buffer nor risking causing
confusion about thread_dump_buffer containing bits from an interrupted
dump in progress.

It's only the caller that's responsible for notifying the requester of
the end of the dump by setting bit 0 of the pointer if needed (i.e. it's
only done in the debug handler).
include/haproxy/debug.h
src/debug.c