Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_unix/sys/src/libsec/port/fastrand.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include	<u.h>
2
#include	<libc.h>
3
#include	<libsec.h>
4
 
5
/* 
6
 *  use the X917 random number generator to create random
7
 *  numbers (faster than truerand() but not as random).
8
 */
9
ulong
10
fastrand(void)
11
{
12
	ulong x;
13
 
14
	genrandom((uchar*)&x, sizeof x);
15
	return x;
16
}