]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: list: adding MT_LIST_APPEND_LOCKED macro
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 20 Oct 2022 15:37:51 +0000 (17:37 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 21 Oct 2022 14:26:27 +0000 (16:26 +0200)
commite951c3435c760142612461dc759b6fbb2ec69c21
tree7d879516a450046496adde3e4a2a7ccafc84f45f
parent18c284c1261764bf9de9153bbe1ee4e53c6c836d
MINOR: list: adding MT_LIST_APPEND_LOCKED macro

adding a new mt macro: MT_LIST_APPEND_LOCKED.

This macro may be used to append an item to an existing
list, like MT_LIST_APPEND.

But here the item will be forced into locked/busy state
prior to appending, so that it is already referenced
in the list while still preventing concurrent accesses
until we decide to unlock it.

The macro returns a struct mt_list "np", that is needed
at unlock time using regular MT_LIST_UNLOCK_ELT macro.
include/haproxy/list.h