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

Function wait_workers_to_join

dpdk/drivers/event/dpaa2/dpaa2_eventdev_selftest.c:463–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

461}
462
463static int
464wait_workers_to_join(int lcore, const rte_atomic32_t *count)
465{
466 uint64_t cycles, print_cycles;
467
468 RTE_SET_USED(count);
469
470 print_cycles = cycles = rte_get_timer_cycles();
471 while (rte_eal_get_lcore_state(lcore) != WAIT) {
472 uint64_t new_cycles = rte_get_timer_cycles();
473
474 if (new_cycles - print_cycles > rte_get_timer_hz()) {
475 dpaa2_evdev_dbg("\r%s: events %d", __func__,
476 rte_atomic32_read(count));
477 print_cycles = new_cycles;
478 }
479 if (new_cycles - cycles > rte_get_timer_hz() * 10) {
480 dpaa2_evdev_info(
481 "%s: No schedules for seconds, deadlock (%d)",
482 __func__,
483 rte_atomic32_read(count));
484 rte_event_dev_dump(evdev, stdout);
485 cycles = new_cycles;
486 return -1;
487 }
488 }
489 rte_eal_mp_wait_lcore();
490 return 0;
491}
492
493
494static int

Callers 1

launch_workers_and_waitFunction · 0.70

Calls 4

rte_eal_get_lcore_stateFunction · 0.85
rte_atomic32_readFunction · 0.85
rte_event_dev_dumpFunction · 0.85
rte_eal_mp_wait_lcoreFunction · 0.85

Tested by

no test coverage detected