Skip to content

Commit

Permalink
Merge pull request #45 from NightFeather/master
Browse files Browse the repository at this point in the history
Detect cores actually present.
  • Loading branch information
kevinlekiller committed Sep 12, 2022
2 parents be91f8f + 1501607 commit f302b80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion amdctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void getCpuInfo() {
}

// Check for dual or quad CPU motherboards.
unsigned short testcores = (unsigned short) sysconf(_SC_NPROCESSORS_CONF);
unsigned short testcores = (unsigned short) sysconf(_SC_NPROCESSORS_ONLN);
if (testcores > cores) {
if (!quiet) {
printf("Multi-CPU motherboard detected: CPU has %d cores, but there is a total %d cores in %d CPU sockets.\n", cores, testcores, testcores / cores);
Expand Down

0 comments on commit f302b80

Please sign in to comment.