From 8a07bc43b4e3a8ccf329205ea2ef56c39e53cd1f Mon Sep 17 00:00:00 2001 From: aristocratos Date: Thu, 13 Oct 2022 09:26:06 +0200 Subject: [PATCH] Changed: Reverted back to sysconf(_SC_NPROCESSORS_ONLN) for Cpu core count ant let the new dynamic update fix if cores are turned on later --- src/linux/btop_collect.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp index b2085f6..f889b6d 100644 --- a/src/linux/btop_collect.cpp +++ b/src/linux/btop_collect.cpp @@ -26,7 +26,6 @@ tab-size = 4 #include #include #include -#include #if !(defined(STATIC_BUILD) && defined(__GLIBC__)) #include @@ -107,7 +106,7 @@ namespace Shared { if (passwd_path.empty()) Logger::warning("Could not read /etc/passwd, will show UID instead of username."); - coreCount = std::thread::hardware_concurrency(); + coreCount = sysconf(_SC_NPROCESSORS_ONLN); if (coreCount < 1) { coreCount = sysconf(_SC_NPROCESSORS_CONF); if (coreCount < 1) {