From 2107ea84f10bd5aa260dd84365bb85b7eab1dfdf Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Mon, 2 Dec 2019 14:06:38 +0100 Subject: [PATCH] openbsd: use actual number of cpus being used --- openbsd/cpu.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbsd/cpu.cc b/openbsd/cpu.cc index e016c27..4407e8c 100644 --- a/openbsd/cpu.cc +++ b/openbsd/cpu.cc @@ -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 )