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

Function ifpga_monitor_stop_func

dpdk/drivers/raw/ifpga/ifpga_rawdev.c:566–590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

564}
565
566static int
567ifpga_monitor_stop_func(struct ifpga_rawdev *dev)
568{
569 int ret;
570
571 if (!dev || !dev->poll_enabled)
572 return 0;
573
574 dev->poll_enabled = 0;
575
576 if (!(__atomic_fetch_sub(&ifpga_monitor_refcnt, 1, __ATOMIC_RELAXED) - 1) &&
577 ifpga_monitor_start_thread.opaque_id != 0) {
578 ret = pthread_cancel((pthread_t)ifpga_monitor_start_thread.opaque_id);
579 if (ret)
580 IFPGA_RAWDEV_PMD_ERR("Can't cancel the thread");
581
582 ret = rte_thread_join(ifpga_monitor_start_thread, NULL);
583 if (ret)
584 IFPGA_RAWDEV_PMD_ERR("Can't join the thread");
585
586 return ret;
587 }
588
589 return 0;
590}
591
592static int
593ifpga_fill_afu_dev(struct opae_accelerator *acc,

Callers 1

ifpga_rawdev_closeFunction · 0.85

Calls 1

rte_thread_joinFunction · 0.50

Tested by

no test coverage detected