MCPcopy Create free account
hub / github.com/apache/nuttx / rpmsg_device_created

Function rpmsg_device_created

drivers/rpmsg/rpmsg.c:419–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417}
418
419void rpmsg_device_created(FAR struct rpmsg_s *rpmsg)
420{
421 FAR struct rpmsg_device *rdev = rpmsg_get_rdev_by_rpmsg(rpmsg);
422 FAR struct metal_list *node;
423 FAR struct metal_list *tmp;
424
425 down_write(&g_rpmsg_lock);
426 metal_list_for_each_safe(&g_rpmsg_cb, tmp, node)
427 {
428 FAR struct rpmsg_cb_s *cb =
429 metal_container_of(node, struct rpmsg_cb_s, node);
430
431 if (cb->device_created)
432 {
433 cb->device_created(rdev, cb->priv);
434 }
435 }
436
437 rpmsg->init = true;
438 up_write(&g_rpmsg_lock);
439
440#ifdef CONFIG_RPMSG_PING
441 rpmsg_ping_init(rdev, &rpmsg->ping);
442#endif
443#ifdef CONFIG_RPMSG_TEST
444 rpmsg_test_init(rdev, &rpmsg->test);
445#endif
446}
447
448void rpmsg_device_destory(FAR struct rpmsg_s *rpmsg)
449{

Callers 4

rpmsg_router_edge_createFunction · 0.85
rpmsg_virtio_startFunction · 0.85
rpmsg_port_registerFunction · 0.85
rpmsg_virtio_lite_startFunction · 0.85

Calls 5

rpmsg_get_rdev_by_rpmsgFunction · 0.85
down_writeFunction · 0.85
up_writeFunction · 0.85
rpmsg_ping_initFunction · 0.85
rpmsg_test_initFunction · 0.85

Tested by

no test coverage detected