diff options
author | 2008-10-15 23:23:44 +0000 | |
---|---|---|
committer | 2008-10-15 23:23:44 +0000 | |
commit | 6a46a94a8d35d2e57d71cb07f2d89013d0a50162 (patch) | |
tree | c793708779a061a3e985aed9897ce7610fbf44a1 /sys/lib/libkern/libkern.h | |
parent | Fix list_for_each_safe compat marco. It currently skips the last entry. (diff) | |
download | wireguard-openbsd-6a46a94a8d35d2e57d71cb07f2d89013d0a50162.tar.xz wireguard-openbsd-6a46a94a8d35d2e57d71cb07f2d89013d0a50162.zip |
make random(9) return per-cpu values (by saving the seed in the cpuinfo),
which are uniform for the profclock on each cpu in a SMP system (but using
a different seed for each cpu). on all cpus, avoid seeding with a value out
of the [0, 2^31-1] range (since that is not stable)
ok kettenis drahn
Diffstat (limited to 'sys/lib/libkern/libkern.h')
-rw-r--r-- | sys/lib/libkern/libkern.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/lib/libkern/libkern.h b/sys/lib/libkern/libkern.h index a357f0ece48..7eac2cc7bf8 100644 --- a/sys/lib/libkern/libkern.h +++ b/sys/lib/libkern/libkern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libkern.h,v 1.24 2007/05/04 22:17:30 deraadt Exp $ */ +/* $OpenBSD: libkern.h,v 1.25 2008/10/15 23:23:51 deraadt Exp $ */ /* $NetBSD: libkern.h,v 1.7 1996/03/14 18:52:08 christos Exp $ */ /*- @@ -155,8 +155,8 @@ void bzero(void *, size_t); int ffs(int); void *memchr(const void *, int, size_t); int memcmp(const void *, const void *, size_t); -u_long random(void); -void srandom(u_long); +u_int32_t random(void); +void srandom(u_int32_t); int scanc(u_int, const u_char *, const u_char [], int); int skpc(int, size_t, u_char *); size_t strlen(const char *); |