commit | 4297363de3985d0b0bd55f03420c3db200ef43da | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Thu Jun 18 08:05:15 2020 +0200 |
committer | Willy Tarreau <w@1wt.eu> | Thu Jun 18 08:08:50 2020 +0200 |
tree | 9fc17c3751d7a9ab7b6ed969d63356f5852fd32f | |
parent | c460c91633d5407a02f9d3aadf0abece5a4e4b45 [diff] |
MINOR: fd: slightly optimize the fd_takeover double-CAS loop The loop in fd_takeover() around the double-CAS is conditionned on a previous value of old_masks[0] that always matches tid_bit on the first iteration because it does not result from the atomic op but from a pre-loaded value. Let's set the result of the atomic op there instead so that the conflict between threads can be detected earlier and before performing the double-word CAS.