diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-10-15 23:23:52 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-10-15 23:23:52 +0000 |
commit | 402af595bcaa120a104360ebebeb3d8f5eac8859 (patch) | |
tree | 246ce2dffcd538c7674e8ed19b552cbadd811192 /sys/arch/alpha/include/cpu.h | |
parent | 01ed2ea8940e2739cafb585b7d5f8d8db553c397 (diff) |
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/arch/alpha/include/cpu.h')
-rw-r--r-- | sys/arch/alpha/include/cpu.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/alpha/include/cpu.h b/sys/arch/alpha/include/cpu.h index 3351d04a32a..508c3d00c58 100644 --- a/sys/arch/alpha/include/cpu.h +++ b/sys/arch/alpha/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.35 2008/10/10 08:36:28 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.36 2008/10/15 23:23:44 deraadt Exp $ */ /* $NetBSD: cpu.h,v 1.45 2000/08/21 02:03:12 thorpej Exp $ */ /*- @@ -202,6 +202,7 @@ struct cpu_info { u_long ci_flags; /* flags; see below */ u_long ci_ipis; /* interprocessor interrupts pending */ #endif + u_int32_t ci_randseed; }; #define CPUF_PRIMARY 0x01 /* CPU is primary CPU */ |