|
PatchworkOS
|
#include <kernel/drivers/rand.h>#include <kernel/cpu/cpu.h>#include <kernel/cpu/smp.h>#include <kernel/log/log.h>#include <stdbool.h>#include <stdint.h>#include <sys/cpuid.h>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) |
Definition at line 13 of file rand.c.
References atomic_load, atomic_store, buffer, seed, and timer_uptime().
Referenced by rand_gen().
|
static |
Definition at line 11 of file rand.c.
Referenced by rand_gen_fallback(), and srand().