]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: freq_ctr: provide non-blocking read functions
authorWilly Tarreau <w@1wt.eu>
Fri, 21 Feb 2025 17:21:56 +0000 (18:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 21 Feb 2025 17:26:29 +0000 (18:26 +0100)
commit29e246a84ce27af63779d98b305ad53877ae9acc
tree3ff2b957ccf17aa2cabc1a39f17b2484afead566
parent84d4c948fce4b31220bb9a30cbf676613bbbf4f2
MINOR: freq_ctr: provide non-blocking read functions

Some code called by the debug handlers in the context of a signal handler
accesses to some freq_ctr and occasionally ends up on a locked one from
the same thread that is dumping it. Let's introduce a non-blocking version
that at least allows to return even if the value is in the process of being
updated, it's less problematic than hanging.
include/haproxy/freq_ctr.h
src/freq_ctr.c