MINOR: ring: reserve one special value for the readers count
authorWilly Tarreau <w@1wt.eu>
Mon, 20 Feb 2023 18:21:52 +0000 (19:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Mar 2024 17:34:19 +0000 (17:34 +0000)
commit0b1c17a2dd88889319344b59c135493e07cd6471
tree2bd5dbcc9cafe5540b3919b37db48c07a5838f31
parent0f611987dadb2e60af38ca7bdd59f6271ca11e34
MINOR: ring: reserve one special value for the readers count

In order to support concurrent writers we'll need to lock areas in the
buffer. For this we'll use one special value of the single-byte readers
count. Let's reserve it now and use the macro instead of the hardcoded
255.
include/haproxy/ring-t.h
src/ring.c