mips: add vdso support
[musl.git] / src / prng / rand.c
blobc000cd248cef667bab257940768616c9349f7d70
1 #include <stdlib.h>
2 #include <stdint.h>
4 static uint64_t seed;
6 void srand(unsigned s)
8 seed = s-1;
11 int rand(void)
13 seed = 6364136223846793005ULL*seed + 1;
14 return seed>>33;