[go: up one dir, main page]

File: rand.h

package info (click to toggle)
critnib 1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, trixie
  • size: 188 kB
  • sloc: ansic: 1,414; sh: 100; makefile: 3
file content (29 lines) | stat: -rw-r--r-- 440 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* SPDX-License-Identifier: BSD-3-Clause */
/* Copyright 2019-2020, Intel Corporation */

/*
 * rand.h -- random utils
 */

#ifndef RAND_H
#define RAND_H 1

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef uint64_t rng_t[4];

uint64_t hash64(uint64_t x);
uint64_t rnd64_r(rng_t *rng);
void randomize_r(rng_t *rng, uint64_t seed);
uint64_t rnd64(void);
void randomize(uint64_t seed);

#ifdef __cplusplus
}
#endif

#endif