1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * (C) Copyright 2000-2009
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
13 * srand() - Set the random-number seed value
15 * This can be used to restart the pseudo-random-number sequence from a known
16 * point. This affects future calls to rand() to start from that point
20 void srand(unsigned int seed);
23 * rand() - Get a 32-bit pseudo-random number
25 * Return: next random number in the sequence
27 unsigned int rand(void);
30 * rand_r() - Get a 32-bit pseudo-random number
32 * This version of the function allows multiple sequences to be used at the
33 * same time, since it requires the caller to store the seed value.
35 * @seedp: seed value to use, updated on exit
36 * Return: next random number in the sequence
38 unsigned int rand_r(unsigned int *seedp);