X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Futils_random.h;h=e25ae9b67829c4579406e7d96e912f1bcdeab4af;hb=cd401b9728839f8b24fd16fac9e9c1753526fd4e;hp=b05f4c86a3798d0a09e91b17483e1b55cd01d1ea;hpb=6299d39b903cb87a3db5b6d2148a2d717754a30a;p=collectd.git diff --git a/src/daemon/utils_random.h b/src/daemon/utils_random.h index b05f4c86..e25ae9b6 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(); + +/** + * 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(); /** * 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);