| 119 | |
| 120 | static __rte_always_inline |
| 121 | struct 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 | |
| 134 | uint64_t |
| 135 | rte_rand(void) |
no test coverage detected