]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: queue: centralize dequeuing code a bit better
authorWilly Tarreau <w@1wt.eu>
Wed, 25 Jul 2018 06:04:20 +0000 (08:04 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 26 Jul 2018 15:32:48 +0000 (17:32 +0200)
commit9624faec8653121386fdf986540f33676b00f5fc
tree3e18380fb93c303a57b6629ca4850d0e33cf332e
parent77551ee8a733e7ef2a12691ddcd263528c2ea1e0
MINOR: queue: centralize dequeuing code a bit better

For now the pendconns may be dequeued at two places :
  - pendconn_unlink(), which operates on a locked queue
  - pendconn_free(), which operates on an unlocked queue and frees
    everything.

Some changes are coming to the queue and we'll need to be able to be a
bit stricter regarding the places where we dequeue to keep the accounting
accurate. This first step renames the locked function __pendconn_unlink()
as it's for use by those aware of it, and introduces a new general purpose
pendconn_unlink() function which automatically grabs the necessary locks
before calling the former, and pendconn_cond_unlink() which additionally
checks the pointer and the presence in the queue.
include/proto/queue.h
src/queue.c