| 277 | static struct test_args thread_test_args; |
| 278 | |
| 279 | static int |
| 280 | stack_thread_push_pop(__rte_unused void *args) |
| 281 | { |
| 282 | void *obj_table[MAX_BULK]; |
| 283 | int i; |
| 284 | |
| 285 | for (i = 0; i < NUM_ITERS_PER_THREAD; i++) { |
| 286 | unsigned int num; |
| 287 | |
| 288 | num = rte_rand() % MAX_BULK; |
| 289 | |
| 290 | if (rte_stack_push(thread_test_args.s, obj_table, num) != num) { |
| 291 | printf("[%s():%u] Failed to push %u pointers\n", |
| 292 | __func__, __LINE__, num); |
| 293 | return -1; |
| 294 | } |
| 295 | |
| 296 | if (rte_stack_pop(thread_test_args.s, obj_table, num) != num) { |
| 297 | printf("[%s():%u] Failed to pop %u pointers\n", |
| 298 | __func__, __LINE__, num); |
| 299 | return -1; |
| 300 | } |
| 301 | } |
| 302 | |
| 303 | return 0; |
| 304 | } |
| 305 | |
| 306 | static int |
| 307 | test_stack_multithreaded(uint32_t flags) |
nothing calls this directly
no test coverage detected