]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: fd: make fd_clr_running() return the previous value instead
authorWilly Tarreau <w@1wt.eu>
Sat, 9 Jul 2022 13:57:17 +0000 (15:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 Jul 2022 18:16:30 +0000 (20:16 +0200)
commitd6e198761281e755e5b96272ed2a751df096efdf
tree300c265485ca20be818b0fff8fc5513c40307c5a
parenta707d02657760958f83f199d18baea9f394edb4e
MINOR: fd: make fd_clr_running() return the previous value instead

It's an AND so it destroys information and due to this there's a call
place where we have to perform two reads to know the previous value
then to change it. With a fetch-and-and instead, in a single operation
we can know if the bit was previously present, which is more efficient.
include/haproxy/fd.h
src/fd.c