summaryrefslogtreecommitdiff
path: root/src/support/rand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/rand.c')
-rw-r--r--src/support/rand.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/support/rand.c b/src/support/rand.c
index a5b229b9abc..4fae43edc8e 100644
--- a/src/support/rand.c
+++ b/src/support/rand.c
@@ -120,3 +120,15 @@ __wt_random(WT_RAND_STATE volatile * rnd_state)
return ((z << 16) + (w & 65535));
}
+
+/*
+ * __wt_random64 --
+ * Return a 64-bit pseudo-random number.
+ */
+uint64_t
+__wt_random64(WT_RAND_STATE volatile * rnd_state)
+ WT_GCC_FUNC_ATTRIBUTE((visibility("default")))
+{
+ return (((uint64_t)__wt_random(rnd_state) << 32) +
+ __wt_random(rnd_state));
+}