diff options
author | fireice-uk <fireice-uk@users.noreply.github.com> | 2017-10-27 17:19:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-27 17:19:00 +0100 |
commit | 91b307859ea97cc1abdb17da01b94919d3521803 (patch) | |
tree | 604e06aac65134610405c75610735e08ac5398a4 /xmrstak/backend/amd/minethd.hpp | |
parent | 847831e5f11a31bf2b04bc737534b08d1bb18e91 (diff) | |
parent | b5a7e4eb7f271cf0ae6a6085ee6e2a4466013e17 (diff) | |
download | xmr-stak-91b307859ea97cc1abdb17da01b94919d3521803.zip xmr-stak-91b307859ea97cc1abdb17da01b94919d3521803.tar.gz |
Merge pull request #69 from psychocrypt/topic-threadAffinity
thread affinity for non cpu backends
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; |