MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_ofw_get_next_cpu_node

Function rt_ofw_get_next_cpu_node

components/drivers/ofw/base.c:921–954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

919}
920
921struct rt_ofw_node *rt_ofw_get_next_cpu_node(struct rt_ofw_node *prev)
922{
923 struct rt_ofw_node *cpu_np;
924
925 if (prev)
926 {
927 cpu_np = prev->sibling;
928 rt_ofw_node_put(prev);
929 }
930 else
931 {
932 cpu_np = ofw_node_cpus->child;
933 }
934
935 for (; cpu_np; cpu_np = cpu_np->sibling)
936 {
937 if (ofw_node_is_fail(cpu_np))
938 {
939 continue;
940 }
941
942 if (!(rt_ofw_node_tag_equ(cpu_np, "cpu") || rt_ofw_node_is_type(cpu_np, "cpu")))
943 {
944 continue;
945 }
946
947 if (rt_ofw_node_get(cpu_np))
948 {
949 break;
950 }
951 }
952
953 return cpu_np;
954}
955
956struct rt_ofw_node *rt_ofw_get_cpu_state_node(struct rt_ofw_node *cpu_np, int index)
957{

Callers

nothing calls this directly

Calls 5

rt_ofw_node_putFunction · 0.85
ofw_node_is_failFunction · 0.85
rt_ofw_node_tag_equFunction · 0.85
rt_ofw_node_is_typeFunction · 0.85
rt_ofw_node_getFunction · 0.85

Tested by

no test coverage detected