linux/scripts/kconfig
Ingo Molnar b0fe551000 kconfig: improve seed in randconfig
'make randconfig' uses glibc's rand function, and the seed of
that PRNG is set via:

			srand(time(NULL));

But 'time()' only increases once every second - freezing the
randconfig result within a single second.

My Nehalem testbox does randconfig much faster than 1 second
 and i have a few scripts that do 'randconfig until condition X'
loops.

Those scripts currently waste a lot of CPU time due to randconfig
changing its seed only once per second currently.

Change the seed to be micrseconds based. (I checked the statistical
spread of the seed - the now.tv_sec*now.tv_usec multiplication
there further improves it.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Roman Zippel <zippel@linux-m68k.org>
[sam: fix for systems where usec is zero - noticed by Geert Uytterhoeven]
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-03-15 23:02:07 +01:00
..
lxdialog kconfig: fix options to check-lxdialog.sh 2008-12-03 22:11:14 +01:00
.gitignore
check.sh
conf.c kconfig: improve seed in randconfig 2009-03-15 23:02:07 +01:00
confdata.c kconfig: fix randconfig for choice blocks 2009-03-15 22:54:57 +01:00
expr.c
expr.h kconfig: struct property commented 2009-01-02 20:43:21 +01:00
gconf.c
gconf.glade
images.c
kconfig_load.c
kxgettext.c
lex.zconf.c_shipped kconfig: improve error messages for bad source statements 2009-01-02 20:43:22 +01:00
lkc_proto.h kconfig: add named choice group 2008-04-28 23:05:48 +02:00
lkc.h kconfig: set all new symbols automatically 2008-07-25 22:12:48 +02:00
Makefile x86, um: get rid of arch/um/Kconfig.arch 2008-10-22 22:55:23 -07:00
mconf.c kconfig: fix MAC OS X warnings in menuconfig 2008-05-04 21:03:20 +02:00
menu.c kconfig: add named choice group 2008-04-28 23:05:48 +02:00
POTFILES.in
qconf.cc
qconf.h
symbol.c kconfig: add named choice group 2008-04-28 23:05:48 +02:00
util.c kconfig: incorrect 'len' field initialisation ? 2008-05-19 20:14:49 +02:00
zconf.gperf
zconf.hash.c_shipped
zconf.l kconfig: improve error messages for bad source statements 2009-01-02 20:43:22 +01:00
zconf.tab.c_shipped kconfig: add named choice group 2008-04-28 23:05:48 +02:00
zconf.y kconfig: add named choice group 2008-04-28 23:05:48 +02:00