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

Function cpu_mp_setmaxid

freebsd/mips/mips/mp_machdep.c:205–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205void
206cpu_mp_setmaxid(void)
207{
208 cpuset_t cpumask;
209 int cpu, last;
210
211 platform_cpu_mask(&cpumask);
212 mp_ncpus = 0;
213 last = 1;
214 while ((cpu = CPU_FFS(&cpumask)) != 0) {
215 last = cpu;
216 cpu--;
217 CPU_CLR(cpu, &cpumask);
218 mp_ncpus++;
219 }
220 if (mp_ncpus <= 0)
221 mp_ncpus = 1;
222
223 mp_maxid = min(last, MAXCPU) - 1;
224}
225
226void
227cpu_mp_announce(void)

Callers

nothing calls this directly

Calls 2

minFunction · 0.85
platform_cpu_maskFunction · 0.50

Tested by

no test coverage detected