commit | b2475a139e69ba7792054233faee946be7f83ca9 | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Sun May 09 10:26:14 2021 +0200 |
committer | Willy Tarreau <w@1wt.eu> | Sun May 09 10:26:14 2021 +0200 |
tree | 4aa7ba7cdb13239fd1845e757b8f5d24c19b7b5a | |
parent | 714f34580ed31a2fd0604b2bfe2694d15aa04caf [diff] |
MINOR: tools/rnd: compute the result outside of the CAS loop ha_random64() uses a DWCAS loop to produce the random, but it computes the resulting value inside the loop while it doesn't change upon success, so this is a needless overhead inside the critcal path that participates to making threads fail the race and try again. Let's take the value out of the loop.