X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Futils_random.h;h=75bdc12e127f6210eae5de1c0f71b95157c61955;hb=8fd8f76dc11064e75e44448d16d35e09e46191a2;hp=b05f4c86a3798d0a09e91b17483e1b55cd01d1ea;hpb=c21ce3b44f63d706b8b200a88047db74f1a51392;p=collectd.git 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);