PatchworkOS  966e257
A non-POSIX operating system.
Loading...
Searching...
No Matches
rand.c File Reference
#include <kernel/drivers/rand.h>
#include <kernel/cpu/cpu.h>
#include <kernel/log/log.h>
#include <kernel/sched/clock.h>
#include <stdbool.h>
#include <stdint.h>
#include <sys/cpuid.h>
Include dependency graph for rand.c:

Go to the source code of this file.

Functions

static uint64_t rand_gen_fallback (void *buffer, uint64_t size)
 
void rand_cpu_init (rand_cpu_ctx_t *ctx)
 Initializes the random number generator.
 
uint64_t rand_gen (void *buffer, uint64_t size)
 Fills a buffer with random bytes.
 

Variables

static atomic_uint64_t seed = ATOMIC_VAR_INIT(0x123456789ABCDEF0)
 

Function Documentation

◆ rand_gen_fallback()

static uint64_t rand_gen_fallback ( void *  buffer,
uint64_t  size 
)
static

Definition at line 13 of file rand.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ seed

atomic_uint64_t seed = ATOMIC_VAR_INIT(0x123456789ABCDEF0)
static

Definition at line 11 of file rand.c.