summaryrefslogtreecommitdiff
path: root/userland/libc/stdlib/srand.c
blob: a35185a0ccf8265929cd680413891dbad41c8119 (plain)
1
2
3
4
5
6
7
8
#include <stdint.h>
#include <stdlib.h>

uint32_t __INTERNAL_RNG_STATE;
void srand(unsigned int seed) {
  __INTERNAL_RNG_STATE = seed;
  __INTERNAL_RNG_STATE = rand(); // rand() used the internal rng state
}