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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user