projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove LVM plugin
[collectd.git]
/
src
/
daemon
/
utils_random.h
diff --git
a/src/daemon/utils_random.h
b/src/daemon/utils_random.h
index
b05f4c8
..
ff0022e
100644
(file)
--- a/
src/daemon/utils_random.h
+++ b/
src/daemon/utils_random.h
@@
-24,12
+24,23
@@
* Florian Forster <octo at collectd.org>
**/
* Florian Forster <octo at collectd.org>
**/
+#ifndef UTILS_RANDOM_H
+#define UTILS_RANDOM_H 1
+
/**
* Returns a random double value in the range [0..1), i.e. excluding 1.
*
* This function is thread- and reentrant-safe.
*/
/**
* Returns a random double value in the range [0..1), i.e. excluding 1.
*
* 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.
/**
* Returns a random long between min and max, inclusively.
@@
-37,4
+48,6
@@
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.
*/
* 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);
+
+#endif /* !UTILS_RANDOM_H */