diff options
Diffstat (limited to 'sys/base/rng/internal.h')
-rw-r--r-- | sys/base/rng/internal.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/base/rng/internal.h b/sys/base/rng/internal.h new file mode 100644 index 0000000..9cf5f41 --- /dev/null +++ b/sys/base/rng/internal.h @@ -0,0 +1,19 @@ +#pragma once + +#include <u.h> +#include <base.h> + +#define rol64(x, k) ((x) << (k) | ((x) >> (64-(k)))) + +typedef struct Rng +{ + uint64 s[4]; +} Rng; + +typedef struct Mix +{ + uint64 s; +} Mix; + + +extern Rng rng·RNG; |