CLEANUP: atomic: add HA_ATOMIC_INC/DEC for unit increments
authorWilly Tarreau <w@1wt.eu>
Tue, 6 Apr 2021 10:11:04 +0000 (12:11 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 7 Apr 2021 16:18:37 +0000 (18:18 +0200)
commit22d675cb772f6e123412b7a8aee55425499a30cf
tree577fe7bc2d96a6640928918b4338fd98511b4ced
parent185157201c3cf1becc95a195b7e4bf2a1eb7ff58
CLEANUP: atomic: add HA_ATOMIC_INC/DEC for unit increments

Most ADD/SUB callers use them for a single unit (e.g. refcounts) and
it's a pain to always pass ",1". Let's add them to simplify the API.
However we currently don't add any return value. If needed in the future
better report zero/non-zero than a real value for the sake of efficiency
at the instruction level.
include/haproxy/atomic.h