MINOR: vecpair: add necessary functions to use vecpairss from/to ring APIs
authorWilly Tarreau <w@1wt.eu>
Mon, 26 Feb 2024 18:53:34 +0000 (19:53 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Mar 2024 17:34:19 +0000 (17:34 +0000)
commitc222cb83890415608b66097575ff2268db2c4cc2
treec44ef4c216c5dae87f0f64bfd387cc3d70066f0f
parent63261aae39c2fc92857fd7d8ee39208dc7f192a9
MINOR: vecpair: add necessary functions to use vecpairss from/to ring APIs

Many ring-based APIs need a tail and a head, with some extra assumption
that the user takes care of not filling the ring so that tail==head is
unambiguous. Vectors are particularly suited to this usage so here we
create 4 functions to create vectors representing free room or data
from a ring, as well as updating rings based on a pair of vectors that
represents either free space or data.
include/haproxy/vecpair.h