Skip to content

Commit

Permalink
CPU (FreeBSD): detect the number of online cores
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Sep 6, 2024
1 parent de8efb3 commit c24d378
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/detection/cpu/cpu_bsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)

cpu->coresPhysical = (uint16_t) ffSysctlGetInt("hw.ncpu", 1);
cpu->coresLogical = cpu->coresPhysical;
cpu->coresOnline = cpu->coresPhysical;
cpu->coresOnline = (uint16_t) ffSysctlGetInt("kern.smp.cpus", cpu->coresLogical);

FF_STRBUF_AUTO_DESTROY buffer = ffStrbufCreate();
if (ffSysctlGetString("kern.sched.topology_spec", &buffer) == NULL && buffer.length > 0)
Expand Down

0 comments on commit c24d378

Please sign in to comment.