DPDK
19.08.0-rc0
Main Page
Related Pages
+
Data Structures
Data Structures
+
Data Fields
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Files
File List
+
Globals
+
All
_
a
b
c
d
e
f
h
i
l
m
o
p
r
s
t
u
v
w
+
Functions
_
c
e
p
r
s
t
+
Variables
b
c
l
m
r
+
Typedefs
a
c
d
e
h
l
m
p
r
s
u
+
Enumerations
r
+
Enumerator
c
e
f
i
m
r
s
w
+
Macros
_
b
c
d
e
i
l
m
o
p
r
s
t
u
v
Examples
lib
librte_eal
common
include
rte_random.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright(c) 2010-2014 Intel Corporation
3
*/
4
5
#ifndef _RTE_RANDOM_H_
6
#define _RTE_RANDOM_H_
7
14
#ifdef __cplusplus
15
extern
"C"
{
16
#endif
17
18
#include <stdint.h>
19
#include <stdlib.h>
20
31
static
inline
void
32
rte_srand
(uint64_t seedval)
33
{
34
srand48((
long
)seedval);
35
}
36
47
static
inline
uint64_t
48
rte_rand
(
void
)
49
{
50
uint64_t val;
51
val = (uint64_t)lrand48();
52
val <<= 32;
53
val += (uint64_t)lrand48();
54
return
val;
55
}
56
57
#ifdef __cplusplus
58
}
59
#endif
60
61
62
#endif
/* _RTE_RANDOM_H_ */
rte_srand
static void rte_srand(uint64_t seedval)
Definition:
rte_random.h:32
rte_rand
static uint64_t rte_rand(void)
Definition:
rte_random.h:48
Generated by
1.8.15