mirror of
https://github.com/aristocratos/btop.git
synced 2026-01-25 06:21:04 -05:00
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
This commit is contained in:
@@ -26,7 +26,6 @@ tab-size = 4
|
||||
#include <netdb.h>
|
||||
#include <ifaddrs.h>
|
||||
#include <net/if.h>
|
||||
#include <thread>
|
||||
|
||||
#if !(defined(STATIC_BUILD) && defined(__GLIBC__))
|
||||
#include <pwd.h>
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user