PatchworkOS
Loading...
Searching...
No Matches
random.c File Reference
#include "random.h"
#include <stdint.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

int random_gen (void)
 
void random_seed (unsigned newSeed)
 

Variables

static uint64_t seed = 0
 

Function Documentation

◆ random_gen()

int random_gen ( void  )

Definition at line 8 of file random.c.

References RAND_MAX, and seed.

Referenced by rand().

◆ random_seed()

void random_seed ( unsigned  newSeed)

Definition at line 21 of file random.c.

References seed.

Referenced by srand().

Variable Documentation

◆ seed

uint64_t seed = 0
static

Definition at line 6 of file random.c.

Referenced by random_gen(), and random_seed().