diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-27 16:55:58 +0200 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-27 16:59:44 +0200 |
commit | b5a7e4eb7f271cf0ae6a6085ee6e2a4466013e17 (patch) | |
tree | 21699d40d44090a4012b8d7791871402849025c6 /xmrstak/backend/amd | |
parent | b685c90fc2d9d76017565d84a73b92a64ca4843c (diff) | |
download | xmr-stak-b5a7e4eb7f271cf0ae6a6085ee6e2a4466013e17.zip xmr-stak-b5a7e4eb7f271cf0ae6a6085ee6e2a4466013e17.tar.gz |
check if affinity must be set
- check if affinity vale before calling `thd_setaffinity`
Diffstat (limited to 'xmrstak/backend/amd')
-rw-r--r-- | xmrstak/backend/amd/minethd.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmrstak/backend/amd/minethd.cpp b/xmrstak/backend/amd/minethd.cpp index e71838b..8bf43f3 100644 --- a/xmrstak/backend/amd/minethd.cpp +++ b/xmrstak/backend/amd/minethd.cpp @@ -64,8 +64,9 @@ minethd::minethd(miner_work& pWork, size_t iNo, GpuContext* ctx, const jconf::th order_guard.wait(); - if(!cpu::minethd::thd_setaffinity(oWorkThd.native_handle(), affinity)) - printer::inst()->print_msg(L1, "WARNING setting affinity failed."); + if(affinity >= 0) //-1 means no affinity + if(!cpu::minethd::thd_setaffinity(oWorkThd.native_handle(), affinity)) + printer::inst()->print_msg(L1, "WARNING setting affinity failed."); } extern "C" { |