]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: lists: Implement locked variations.
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 18 Jan 2019 16:26:26 +0000 (17:26 +0100)
committerOlivier Houchard <cognet@ci0.org>
Tue, 26 Feb 2019 17:17:32 +0000 (18:17 +0100)
commita8434ec14612d9a04e50e1c51e58f663dad46e96
tree82be9f45cb4f4e8435f8c8fcab177d2df518afd7
parent36839dc39f57739896e411764e8a67e1ebd83cb8
MINOR: lists: Implement locked variations.

Implement LIST_ADD_LOCKED(), LIST_ADDQ_LOCKED(), LIST_DEL_LOCKED() and
LIST_POP_LOCKED().

LIST_ADD_LOCKED, LIST_ADDQ_LOCKED and LIST_DEL_LOCKED work the same as
LIST_ADD, LIST_ADDQ and LIST_DEL, except before any manipulation it locks
the relevant elements of the list, so it's safe to manipulate the list
with multiple threads.
LIST_POP_LOCKED() removes the first element from the list, and returns its
data.
include/common/mini-clist.h