Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
/dev/random cleanup [sommerfeld%netbsd.org@localhost: CVS commit: syssrc]
Bill Sommerfeld wrote:
> Module Name: syssrc
> Committed By: sommerfeld
> Date: Mon Jun 5 23:42:35 UTC 2000
>
> Modified Files:
>
> syssrc/sys/dev: rnd.c rndpool.c
> syssrc/sys/sys: rnd.h
>
> Log Message:
>
> /dev/random code cleanups:
> [ ... ]
> - allow MD code to supply cpu_timestamp() and cpu_havetimestamp() for
> an optional higher-resolution clock/roulette wheel source.
One questions - would be be better to store the results of the test
+#ifdef __HAVE_CPU_TIMESTAMP
+ if (cpu_hastimestamp())
+ return cpu_timestamp();
+#endif
in a static variable? I notice that the test is both inline and
inexpensive on the i386 example, but this may not be on other platforms.
Hmm, or maybe make cpu_hastimestamp() a stub call on platforms where
this test would be expensive and leave this fragment as is...
Simon.
Home |
Main Index |
Thread Index |
Old Index