xref: /inferno-os/libsec/port/fastrand.c (revision 37da2899f40661e3e9631e497da8dc59b971cbd0)
1 #include	"os.h"
2 #include	<libsec.h>
3 
4 /*
5  *  use the X917 random number generator to create random
6  *  numbers (faster than truerand() but not as random).
7  */
8 ulong
fastrand(void)9 fastrand(void)
10 {
11 	ulong x;
12 
13 	genrandom((uchar*)&x, sizeof x);
14 	return x;
15 }
16