From deb832c9c675d6920ea7b6d27d3e7b2412041199 Mon Sep 17 00:00:00 2001 From: XMRig Date: Sun, 21 Oct 2018 23:52:23 +0700 Subject: [PATCH] Restore old method for total threads count detection. --- src/core/cpu/AdvancedCpuInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/cpu/AdvancedCpuInfo.cpp b/src/core/cpu/AdvancedCpuInfo.cpp index c1a9f8cd..1f738072 100644 --- a/src/core/cpu/AdvancedCpuInfo.cpp +++ b/src/core/cpu/AdvancedCpuInfo.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include "core/cpu/AdvancedCpuInfo.h" @@ -39,7 +38,7 @@ xmrig::AdvancedCpuInfo::AdvancedCpuInfo() : m_L2(0), m_L3(0), m_sockets(1), - m_threads(std::thread::hardware_concurrency()) + m_threads(0) { struct cpu_raw_data_t raw = { 0 }; struct cpu_id_t data = { 0 }; @@ -49,6 +48,7 @@ xmrig::AdvancedCpuInfo::AdvancedCpuInfo() : strncpy(m_brand, data.brand_str, sizeof(m_brand)); + m_threads = data.total_logical_cpus; m_sockets = threads() / data.num_logical_cpus; if (m_sockets == 0) { m_sockets = 1;