MINOR: queue: make pendconn_first() take the lock by itself
authorWilly Tarreau <w@1wt.eu>
Fri, 18 Jun 2021 18:32:50 +0000 (20:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 22 Jun 2021 16:57:18 +0000 (18:57 +0200)
commit772e968b06f9348afea7f5785c97214a84c75d19
tree118a35b87e4951ad399eee09946800e8e8a47a90
parent5b3927531145384bad8d2b46ca21f017afde81c7
MINOR: queue: make pendconn_first() take the lock by itself

Dealing with the queue lock in the caller remains complicated. Let's
change pendconn_first() to take the queue instead of the tree head,
and handle the lock itself. It now returns an element with a locked
queue or no element with an unlocked queue. It can avoid locking if
the queue is already empty.
src/queue.c