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

Function wait_workers_to_join

dpdk/drivers/event/octeontx/ssovf_evdev_selftest.c:577–604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

575}
576
577static inline int
578wait_workers_to_join(int lcore, const rte_atomic32_t *count)
579{
580 uint64_t cycles, print_cycles;
581 RTE_SET_USED(count);
582
583 print_cycles = cycles = rte_get_timer_cycles();
584 while (rte_eal_get_lcore_state(lcore) != WAIT) {
585 uint64_t new_cycles = rte_get_timer_cycles();
586
587 if (new_cycles - print_cycles > rte_get_timer_hz()) {
588 ssovf_log_dbg("\r%s: events %d", __func__,
589 rte_atomic32_read(count));
590 print_cycles = new_cycles;
591 }
592 if (new_cycles - cycles > rte_get_timer_hz() * 10) {
593 ssovf_log_dbg(
594 "%s: No schedules for seconds, deadlock (%d)",
595 __func__,
596 rte_atomic32_read(count));
597 rte_event_dev_dump(evdev, stdout);
598 cycles = new_cycles;
599 return -1;
600 }
601 }
602 rte_eal_mp_wait_lcore();
603 return 0;
604}
605
606
607static inline 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