MCPcopy Create free account
hub / github.com/F-Stack/f-stack / __rte_rand_get_state

Function __rte_rand_get_state

dpdk/lib/eal/common/rte_random.c:121–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119
120static __rte_always_inline
121struct rte_rand_state *__rte_rand_get_state(void)
122{
123 unsigned int idx;
124
125 idx = rte_lcore_id();
126
127 /* last instance reserved for unregistered non-EAL threads */
128 if (unlikely(idx == LCORE_ID_ANY))
129 idx = RTE_MAX_LCORE;
130
131 return &rand_states[idx];
132}
133
134uint64_t
135rte_rand(void)

Callers 2

rte_randFunction · 0.85
rte_rand_maxFunction · 0.85

Calls 1

rte_lcore_idFunction · 0.85

Tested by

no test coverage detected