1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-08 08:23:34 -05:00

More correct CPU affinity support for macOS.

This commit is contained in:
XMRig
2020-12-13 01:20:31 +07:00
parent 87fafcf91b
commit a36fb7e728
7 changed files with 50 additions and 42 deletions

View File

@@ -26,6 +26,7 @@
#include <thread>
#ifndef XMRIG_OS_APPLE
bool xmrig::Platform::setThreadAffinity(uint64_t cpu_id)
{
auto cpu = static_cast<HwlocCpuInfo *>(Cpu::info());
@@ -44,3 +45,4 @@ bool xmrig::Platform::setThreadAffinity(uint64_t cpu_id)
std::this_thread::sleep_for(std::chrono::milliseconds(1));
return result;
}
#endif