commit | e6f5ab5afa1e11d509aa92588b64de6e3d3765a8 | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Thu Apr 20 11:05:28 2023 +0200 |
committer | Willy Tarreau <w@1wt.eu> | Fri Apr 21 17:41:26 2023 +0200 |
tree | a321df72c3c89aa155072e69d911fcd031999592 | |
parent | 09b52d1c3de809a030061db0d4335f31dd2f4bdd [diff] |
MINOR: listener: make accept_queue index atomic There has always been a race when checking the length of an accept queue to determine which one is more loaded that another, because the head and tail are read at two different moments. This is not required, we can merge them as two 16 bit numbers inside a single 32-bit index that is always accessed atomically. This way we read both values at once and always have a consistent measurement.