diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-26 23:09:14 +0200 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-26 23:09:14 +0200 |
commit | b685c90fc2d9d76017565d84a73b92a64ca4843c (patch) | |
tree | b4cdf2191c4e11f00af708569cacacc36223dddc /xmrstak/backend/amd/minethd.hpp | |
parent | 712f7b7bdb02d05aaffc5f70817aeb1edd17a2b3 (diff) | |
download | xmr-stak-b685c90fc2d9d76017565d84a73b92a64ca4843c.zip xmr-stak-b685c90fc2d9d76017565d84a73b92a64ca4843c.tar.gz |
thread affinity for non cpu backends
This is a follow up of #43 and use the some mechanism to set the thread affinity for
non cpu backends correct.
- use cpu affinity workflow for nvidia and amd
- cpu: move messages of thread spawning before thread creation
Diffstat (limited to 'xmrstak/backend/amd/minethd.hpp')
-rw-r--r-- | xmrstak/backend/amd/minethd.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xmrstak/backend/amd/minethd.hpp b/xmrstak/backend/amd/minethd.hpp index 21c2dd9..c4c2ce6 100644 --- a/xmrstak/backend/amd/minethd.hpp +++ b/xmrstak/backend/amd/minethd.hpp @@ -9,6 +9,7 @@ #include <thread> #include <atomic> +#include <future> namespace xmrstak { @@ -26,10 +27,9 @@ public: private: typedef void (*cn_hash_fun)(const void*, size_t, void*, cryptonight_ctx*); - minethd(miner_work& pWork, size_t iNo, GpuContext* ctx); + minethd(miner_work& pWork, size_t iNo, GpuContext* ctx, const jconf::thd_cfg cfg); void work_main(); - void double_work_main(); void consume_work(); uint64_t iJobNo; @@ -37,7 +37,10 @@ private: static miner_work oGlobalWork; miner_work oWork; + std::promise<void> order_fix; + std::thread oWorkThd; + int64_t affinity; bool bQuit; bool bNoPrefetch; |