1 // SPDX-License-Identifier: GPL-2.0+
4 * see http://www.jstatsoft.org/v08/i14/paper
6 * Copyright (c) 2012 Michael Walle
7 * Michael Walle <michael@walle.cc>
13 #ifndef CONFIG_LIB_HW_RAND
14 static unsigned int y = 1U;
16 unsigned int rand_r(unsigned int *seedp)
18 *seedp ^= (*seedp << 13);
19 *seedp ^= (*seedp >> 17);
20 *seedp ^= (*seedp << 5);
25 unsigned int rand(void)
30 void srand(unsigned int seed)