]> git.proxmox.com Git - ceph.git/blob - ceph/src/pmdk/src/common/rand.h
import ceph 16.2.7
[ceph.git] / ceph / src / pmdk / src / common / rand.h
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /* Copyright 2019-2020, Intel Corporation */
3
4 /*
5 * rand.h -- random utils
6 */
7
8 #ifndef RAND_H
9 #define RAND_H 1
10
11 #include <stdint.h>
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 typedef uint64_t rng_t[4];
18
19 uint64_t hash64(uint64_t x);
20 uint64_t rnd64_r(rng_t *rng);
21 void randomize_r(rng_t *rng, uint64_t seed);
22 uint64_t rnd64(void);
23 void randomize(uint64_t seed);
24
25 #ifdef __cplusplus
26 }
27 #endif
28
29 #endif