diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2015-06-01 04:44:30 +0000 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2015-06-01 04:44:30 +0000 |
commit | 7e1fda9a1b820e1dfcbc47c7dbb1ca20d83fa2eb (patch) | |
tree | 6bc935525edd8623570f995aa634cd9c02189f78 | |
parent | fe81376eec95dba8c02290720cd32ccdd0553ff3 (diff) | |
download | mongo-7e1fda9a1b820e1dfcbc47c7dbb1ca20d83fa2eb.tar.gz |
Add a comment.
-rw-r--r-- | src/support/rand.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/support/rand.c b/src/support/rand.c index 66843dadc50..ef1edb26f0f 100644 --- a/src/support/rand.c +++ b/src/support/rand.c @@ -69,6 +69,11 @@ __wt_random(uint64_t * volatile rnd_state) uint64_t rnd; uint32_t w, z; + /* + * Take a copy of the random state so we can ensure that the + * calculation operates on the state consistently regardless of + * concurrent calls with the same random state. + */ rnd = *rnd_state; w = M_W(rnd); z = M_Z(rnd); |