commit | 88ac59be4d7540bb7b6087397eb2ed9aa5f57066 | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Mon Nov 06 01:03:26 2017 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Mon Nov 06 11:20:11 2017 +0100 |
tree | b75db5cea29482cbddde010ba58202c71600da5f | |
parent | ce4e0aa7f387f589e293419269c5641c3966fbbc [diff] |
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.