Merge pull request #60 from jasperla/openbsd/ncpuonline

openbsd: use actual number of cpus being used
This commit is contained in:
Matt McCormick 2019-12-02 16:18:38 -05:00 committed by GitHub
commit 12417dc358
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,7 +27,7 @@
uint8_t get_cpu_count()
{
int cpu_count = 1; // default to 1
int mib[2] = { CTL_HW, HW_NCPU };
int mib[2] = { CTL_HW, HW_NCPUONLINE };
size_t len = sizeof( cpu_count );
if( sysctl( mib, 2, &cpu_count, &len, NULL, 0 ) < 0 )