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

Function rte_dev_event_monitor_stop

dpdk/lib/eal/linux/eal_dev.c:356–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354}
355
356int
357rte_dev_event_monitor_stop(void)
358{
359 int ret = 0;
360
361 rte_rwlock_write_lock(&monitor_lock);
362
363 if (!monitor_refcount) {
364 RTE_LOG(ERR, EAL, "device event monitor already stopped\n");
365 goto exit;
366 }
367
368 if (monitor_refcount > 1) {
369 monitor_refcount--;
370 goto exit;
371 }
372
373 ret = rte_intr_callback_unregister(intr_handle, dev_uev_handler,
374 (void *)-1);
375 if (ret < 0) {
376 RTE_LOG(ERR, EAL, "fail to unregister uevent callback.\n");
377 goto exit;
378 }
379
380 close(rte_intr_fd_get(intr_handle));
381 rte_intr_instance_free(intr_handle);
382 intr_handle = NULL;
383 ret = 0;
384
385 monitor_refcount--;
386
387exit:
388 rte_rwlock_write_unlock(&monitor_lock);
389
390 return ret;
391}
392
393int
394dev_sigbus_handler_register(void)

Callers 3

eth_hn_probeFunction · 0.50
eth_hn_removeFunction · 0.50
pmd_test_exitFunction · 0.50

Calls 4

rte_intr_fd_getFunction · 0.85
rte_intr_instance_freeFunction · 0.85
closeFunction · 0.50

Tested by 1

pmd_test_exitFunction · 0.40