.BR random (3).
They are suitable for use in multithreaded programs where each thread
needs to obtain an independent, reproducible sequence of random numbers.
-
+.PP
The
.BR random_r ()
function is like
.BR initstate_r ().
The generated random number is returned in the argument
.IR result .
-
+.PP
The
.BR srandom_r ()
function is like
which must have been previously initialized by
.BR initstate_r (),
instead of the seed associated with the global state variable.
-
+.PP
The
.BR initstate_r ()
function is like
or allocated on the heap using
.BR malloc (3)
or similar.)
-
+.PP
The
.BR setstate_r ()
function is like