mirror of
https://git.wownero.com/wownero/RandomWOW.git
synced 2024-12-21 23:38:54 +00:00
Merge pull request #171 from tevador/pr-affinityfix
Disable thread affinity on FreeBSD and Android
This commit is contained in:
commit
6e842d22bb
@ -65,7 +65,7 @@ set_thread_affinity(std::thread::native_handle_type thread,
|
||||
(thread_policy_t)&policy, 1);
|
||||
#elif defined(_WIN32) || defined(__CYGWIN__)
|
||||
rc = SetThreadAffinityMask(reinterpret_cast<HANDLE>(thread), 1ULL << cpuid) == 0 ? -2 : 0;
|
||||
#elif !defined(__OpenBSD__)
|
||||
#elif !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__ANDROID__)
|
||||
cpu_set_t cs;
|
||||
CPU_ZERO(&cs);
|
||||
CPU_SET(cpuid, &cs);
|
||||
|
Loading…
Reference in New Issue
Block a user