mirror of https://github.com/ntop/n2n.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
524 B
35 lines
524 B
5 years ago
|
#include <stdint.h>
|
||
|
#include <time.h>
|
||
|
|
||
|
|
||
|
#if defined (__linux__)
|
||
|
#include <sys/syscall.h>
|
||
|
#include <unistd.h>
|
||
|
#define GRND_NONBLOCK 1
|
||
|
#endif
|
||
|
|
||
|
#if defined (__RDRND__) || defined (__RDSEED__)
|
||
|
#include <immintrin.h>
|
||
|
#endif
|
||
|
|
||
|
/* The WIN32 code is still untested and thus commented
|
||
|
#if defined (WIN32)
|
||
|
#include <Wincrypt.h>
|
||
|
#endif */
|
||
|
|
||
|
|
||
|
struct rn_generator_state_t {
|
||
|
uint64_t a, b;
|
||
|
};
|
||
|
|
||
|
struct splitmix64_state_t {
|
||
|
uint64_t s;
|
||
|
};
|
||
|
|
||
|
|
||
|
int n2n_srand (uint64_t seed);
|
||
|
|
||
|
uint64_t n2n_rand ();
|
||
|
|
||
|
uint64_t n2n_seed ();
|