]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: ring: rearrange the wait loop in ring_write()
authorWilly Tarreau <w@1wt.eu>
Thu, 18 Sep 2025 12:58:38 +0000 (14:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 18 Sep 2025 12:58:38 +0000 (14:58 +0200)
commiteca1f90e16d793fccdf70c3259d3bcfb72c74bbe
treee0eb163b8f5cd77d506c264aa57573a9872a48bb
parent08c6bbb5424875dc4ea5ef1a536eeb8b50ce5805
CLEANUP: ring: rearrange the wait loop in ring_write()

The loop is constructed in a complicated way with a single break
statement in the middle and many continue statements everywhere,
making it hard to better factor between variants. Let's first
reorganize it so as to make it easier to escape when the ring
tail lock is obtained. The sequence of instrucitons remains the
same, it's only better organized.
src/ring.c