]>
git.ipfire.org Git - people/ms/u-boot.git/blob - lib/rand.c
3 * see http://www.jstatsoft.org/v08/i14/paper
5 * Copyright (c) 2012 Michael Walle
6 * Michael Walle <michael@walle.cc>
8 * SPDX-License-Identifier: GPL-2.0+
13 static unsigned int y
= 1U;
15 unsigned int rand_r(unsigned int *seedp
)
17 *seedp
^= (*seedp
<< 13);
18 *seedp
^= (*seedp
>> 17);
19 *seedp
^= (*seedp
<< 5);
24 unsigned int rand(void)
29 void srand(unsigned int seed
)