libcute 0.1
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
state.h File Reference
#include <stdint.h>
Include dependency graph for state.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cu_State
 
struct  cu_RandomState
 

Typedefs

typedef uint32_t(* cu_State_NextFn) (void *ctx)
 

Functions

uint32_t cu_random_seed (void)
 

Detailed Description

Interface for pseudo-random state.

Typedef Documentation

◆ cu_State_NextFn

typedef uint32_t(* cu_State_NextFn) (void *ctx)

Callback type to fetch the next random value.

Function Documentation

◆ cu_random_seed()

uint32_t cu_random_seed ( void  )

Return a somewhat unpredictable seed value.

On hosted systems this tries OS randomness with fallbacks. For freestanding builds a mix of stack and return addresses is used to provide variability.

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