Extra code path for OpenBSD suggested by psychocrypt

This commit is contained in:
Vladimir Tamara
2018-01-16 22:59:42 -05:00
parent 1d60d43fbc
commit 4f109d0335
+3 -1
View File
@@ -84,7 +84,9 @@ bool minethd::thd_setaffinity(std::thread::native_handle_type h, uint64_t cpu_id
CPU_ZERO(&mn);
CPU_SET(cpu_id, &mn);
return pthread_setaffinity_np(h, sizeof(cpuset_t), &mn) == 0;
#elif !defined(__OpenBSD__)
#elif defined(__OpenBSD__)
printer::inst()->print_msg(L0,"WARNING: thread pinning is not supported under OPENBSD.");
#else
cpu_set_t mn;
CPU_ZERO(&mn);
CPU_SET(cpu_id, &mn);