shithub: riscv

ref: 71a993b4ca2c455f491aad669e3a4ac2979f6bb8
dir: /sys/src/libsec/port/fastrand.c/

View raw version
#include "os.h"
#include <libsec.h>

/* 
 *  use the X917 random number generator to create random
 *  numbers (faster than truerand() but not as random).
 */
ulong
fastrand(void)
{
	ulong x;
	
	genrandom((uchar*)&x, sizeof x);
	return x;
}