From 402af595bcaa120a104360ebebeb3d8f5eac8859 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 15 Oct 2008 23:23:52 +0000 Subject: 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 --- sys/arch/powerpc/include/cpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/arch/powerpc/include') diff --git a/sys/arch/powerpc/include/cpu.h b/sys/arch/powerpc/include/cpu.h index b14490768a1..5bb8462ef08 100644 --- a/sys/arch/powerpc/include/cpu.h +++ b/sys/arch/powerpc/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.40 2008/10/10 08:05:45 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.41 2008/10/15 23:23:49 deraadt Exp $ */ /* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */ /* @@ -80,7 +80,7 @@ struct cpu_info { #define CI_DDB_ENTERDDB 3 #define CI_DDB_INDDB 4 - u_long ci_randseed; + u_int32_t ci_randseed; }; static __inline struct cpu_info * -- cgit v1.2.3