rand_r(3) rand_r(3)
NAME
randr - thread-safe pseudo-random number generator
SYNOPSIS
#include <stdlib.h>
int randr(unsigned int *seed);
DESCRIPTION
The randr() function is the thread-safe version of rand().
The randr() function computes a sequence of pseudo-random integers in
the range 0 to RANDMAX. (The value of the RANDMAX macro will be at
least 32767.)
If randr() is called with the same initial value for the object
pointed to by seed and that object is not modified between successive
returns and calls to randr(), the same sequence shall be generated.
RETURN VALUE
The randr() function returns a pseudo-random integer.
ERRORS
No errors are defined.
SEE ALSO
rand(3C), stdlib(5).
Page 1 Reliant UNIX 5.44 Printed 11/98