X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fdaemon%2Futils_random.h;h=75bdc12e127f6210eae5de1c0f71b95157c61955;hp=b05f4c86a3798d0a09e91b17483e1b55cd01d1ea;hb=da11ce02eb202b3e01d3e2d1b40f248a84430973;hpb=40e77dd34f9a8466165a8b7d724faeb337c90414 diff --git a/src/daemon/utils_random.h b/src/daemon/utils_random.h index b05f4c86..75bdc12e 100644 --- a/src/daemon/utils_random.h +++ b/src/daemon/utils_random.h @@ -29,7 +29,15 @@ * * This function is thread- and reentrant-safe. */ -double cdrand_d (void); +double cdrand_d(void); + +/** + * cdrand_u returns a random uint32_t value uniformly distributed in the range + * [0-2^32). + * + * This function is thread- and reentrant-safe. + */ +uint32_t cdrand_u(void); /** * Returns a random long between min and max, inclusively. @@ -37,4 +45,4 @@ double cdrand_d (void); * If min is larger than max, the result may be rounded incorrectly and may be * outside the intended range. This function is thread- and reentrant-safe. */ -long cdrand_range (long min, long max); +long cdrand_range(long min, long max);