]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: threads: use faster locks for the spin locks
authorWilly Tarreau <w@1wt.eu>
Mon, 6 Nov 2017 00:03:26 +0000 (01:03 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 6 Nov 2017 10:20:11 +0000 (11:20 +0100)
commit88ac59be4d7540bb7b6087397eb2ed9aa5f57066
treeb75db5cea29482cbddde010ba58202c71600da5f
parentce4e0aa7f387f589e293419269c5641c3966fbbc
MINOR: threads: use faster locks for the spin locks

The spin locks used to rely on W locks, which involve a loop waiting
for readers to leave, and this doesn't happen here. It's more efficient
to use S locks instead, which are also mutually exclusive and do not
have this loop. This saves one test per spinlock and a few tens of
bytes allowing certain functions to be inlined.
include/common/hathreads.h