FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/pcpu.h>
#include <sys/prng.h>
#include <sys/smp.h>
#include <sys/systm.h>
Go to the source code of this file.
Data Structures | |
struct | pcg64u_random_t |
Functions | |
__FBSDID ("$FreeBSD$") | |
static void | pcg64u_srandom_r (pcg64u_random_t *state64, uint64_t seed) |
static uint64_t | pcg64u_random_r (pcg64u_random_t *state64) |
static uint64_t | pcg64u_boundedrand_r (pcg64u_random_t *state64, uint64_t bound) |
DPCPU_DEFINE_STATIC (pcg32u_random_t, pcpu_prng32_state) | |
DPCPU_DEFINE_STATIC (pcg64u_random_t, pcpu_prng64_state) | |
static void | prng_init (void *dummy __unused) |
SYSINIT (prng_init, SI_SUB_CPU, SI_ORDER_ANY, prng_init, NULL) | |
uint32_t | prng32 (void) |
uint32_t | prng32_bounded (uint32_t bound) |
uint64_t | prng64 (void) |
uint64_t | prng64_bounded (uint64_t bound) |
__FBSDID | ( | "$FreeBSD$" | ) |
DPCPU_DEFINE_STATIC | ( | pcg32u_random_t | , |
pcpu_prng32_state | |||
) |
DPCPU_DEFINE_STATIC | ( | pcg64u_random_t | , |
pcpu_prng64_state | |||
) |
|
inlinestatic |
Definition at line 59 of file subr_prng.c.
References pcg64u_random_r().
Referenced by prng64_bounded().
|
inlinestatic |
Definition at line 52 of file subr_prng.c.
References pcg64u_random_t::states.
Referenced by pcg64u_boundedrand_r(), and prng64().
|
inlinestatic |
Definition at line 45 of file subr_prng.c.
References pcg64u_random_t::states.
Referenced by prng_init().
uint32_t prng32 | ( | void | ) |
Definition at line 90 of file subr_prng.c.
uint32_t prng32_bounded | ( | uint32_t | bound | ) |
Definition at line 101 of file subr_prng.c.
Referenced by vn_lock_pair_pause().
uint64_t prng64 | ( | void | ) |
Definition at line 112 of file subr_prng.c.
References pcg64u_random_r().
uint64_t prng64_bounded | ( | uint64_t | bound | ) |
Definition at line 123 of file subr_prng.c.
References pcg64u_boundedrand_r().
|
static |
Definition at line 74 of file subr_prng.c.
References pcg64u_srandom_r().