OPTIM: queue: make the nbpend counters atomic
authorWilly Tarreau <w@1wt.eu>
Wed, 21 Oct 2020 09:45:44 +0000 (11:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 22 Oct 2020 15:32:28 +0000 (17:32 +0200)
commit56c1cfb179d63f61ee54cd7fd26c22d44e1bc08d
tree6844700214a6798bd97aca56f8b68da7fba3b93c
parentc7eedf7a5a8992c911c6004fb3983afb45ef428d
OPTIM: queue: make the nbpend counters atomic

Instead of incrementing, decrementing them and updating their max under
the lock, make them atomic and keep them out of the lock as much as
possible. For __pendconn_unlink_* it would be wide to decide to move
these counters outside of the function, inside the callers so that a
single atomic op can be done per counter even for groups of operations.
src/queue.c