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

Function find_child_with_core

freebsd/net/iflib.c:5955–5970  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5953extern struct cpu_group *cpu_top; /* CPU topology */
5954
5955static int
5956find_child_with_core(int cpu, struct cpu_group *grp)
5957{
5958 int i;
5959
5960 if (grp->cg_children == 0)
5961 return -1;
5962
5963 MPASS(grp->cg_child);
5964 for (i = 0; i < grp->cg_children; i++) {
5965 if (CPU_ISSET(cpu, &grp->cg_child[i].cg_mask))
5966 return i;
5967 }
5968
5969 return -1;
5970}
5971
5972/*
5973 * Find the nth "close" core to the specified core

Callers 1

find_close_coreFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected