aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/libkern.h
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2020-05-23 17:51:06 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2020-05-23 17:51:06 +0000
commit353d02e9276de65b4814fe3be161e74f8e59c9d7 (patch)
treea15c669c01395b328ac78340cb8be3d2bbef0cbf /sys/sys/libkern.h
parenta82f62ec2d45216ea2a6a6854dc1ac35b6a97823 (diff)
downloadsrc-353d02e9276de65b4814fe3be161e74f8e59c9d7.tar.gz
src-353d02e9276de65b4814fe3be161e74f8e59c9d7.zip
libkern: Add arc4random_uniform
This variant get a random number up to the limit passed as the argument. This is simply a copy of the libc version. Sponsored-by: The FreeBSD Foundation Reviewed by: cem, hselasky (previous version) Differential Revision: https://reviews.freebsd.org/D24962
Notes
Notes: svn path=/head/; revision=361418
Diffstat (limited to 'sys/sys/libkern.h')
-rw-r--r--sys/sys/libkern.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h
index 5e873cda726a..3f4623787421 100644
--- a/sys/sys/libkern.h
+++ b/sys/sys/libkern.h
@@ -127,6 +127,7 @@ extern int arc4rand_iniseed_state;
struct malloc_type;
uint32_t arc4random(void);
void arc4random_buf(void *, size_t);
+uint32_t arc4random_uniform(uint32_t);
void arc4rand(void *, u_int, int);
int timingsafe_bcmp(const void *, const void *, size_t);
void *bsearch(const void *, const void *, size_t,