summaryrefslogtreecommitdiff
path: root/src/stdlib/srand.c
blob: 31f37a488e68811ffbb837482b46b1a231175dfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "_stdlib.h"

/** seed the pseudo-random number generator **/

void srand(unsigned int seed)
{
	SIGNAL_SAFE(0);

	__stdlib_h.rand = seed;
}

/***
seeds the pseudo-random number generator with ARGUMENT(seed). The
sequence of pseudo-random numbers generated by a single seed is repeatable.
Program execution begins with a seed of 1.
***/

/*
STDC(1)
*/