From c897fc04518b2701c7ec556a183406bae0760028 Mon Sep 17 00:00:00 2001 From: fireice-uk Date: Wed, 11 Oct 2017 23:53:31 +0100 Subject: cleanup and give a return from set_affinity --- xmrstak/backend/cpu/minethd.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xmrstak/backend/cpu/minethd.hpp') diff --git a/xmrstak/backend/cpu/minethd.hpp b/xmrstak/backend/cpu/minethd.hpp index 58d378e..584fb0d 100644 --- a/xmrstak/backend/cpu/minethd.hpp +++ b/xmrstak/backend/cpu/minethd.hpp @@ -24,7 +24,7 @@ public: typedef void (*cn_hash_fun)(const void*, size_t, void*, cryptonight_ctx*); static cn_hash_fun func_selector(bool bHaveAes, bool bNoPrefetch); - static void thd_setaffinity(std::thread::native_handle_type h, uint64_t cpu_id); + static bool thd_setaffinity(std::thread::native_handle_type h, uint64_t cpu_id); static cryptonight_ctx* minethd_alloc_ctx(); -- cgit v1.1 From 73482f3065af13de1140308f65371d059df7decf Mon Sep 17 00:00:00 2001 From: fireice-uk Date: Thu, 12 Oct 2017 12:38:14 +0100 Subject: Affinity - fix B --- xmrstak/backend/cpu/minethd.hpp | 1 - 1 file changed, 1 deletion(-) (limited to 'xmrstak/backend/cpu/minethd.hpp') diff --git a/xmrstak/backend/cpu/minethd.hpp b/xmrstak/backend/cpu/minethd.hpp index 584fb0d..ad75d07 100644 --- a/xmrstak/backend/cpu/minethd.hpp +++ b/xmrstak/backend/cpu/minethd.hpp @@ -46,7 +46,6 @@ private: miner_work oWork; void pin_thd_affinity(); - // Held by the creating context to prevent a race cond with oWorkThd = std::thread(...) std::mutex work_thd_mtx; std::thread oWorkThd; -- cgit v1.1 From 8bbdd45b9e63f6622ee2eac8f9dd0cd881a78aa4 Mon Sep 17 00:00:00 2001 From: fireice-uk Date: Thu, 12 Oct 2017 12:52:50 +0100 Subject: Affinity - fix C --- xmrstak/backend/cpu/minethd.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xmrstak/backend/cpu/minethd.hpp') diff --git a/xmrstak/backend/cpu/minethd.hpp b/xmrstak/backend/cpu/minethd.hpp index ad75d07..c023fcb 100644 --- a/xmrstak/backend/cpu/minethd.hpp +++ b/xmrstak/backend/cpu/minethd.hpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include namespace xmrstak { @@ -46,7 +46,7 @@ private: miner_work oWork; void pin_thd_affinity(); - std::mutex work_thd_mtx; + std::promise order_fix; std::thread oWorkThd; int64_t affinity; -- cgit v1.1 From 4253e7a0289bcaed1ecab7616f3405dfebb190e4 Mon Sep 17 00:00:00 2001 From: fireice-uk Date: Tue, 17 Oct 2017 19:44:18 +0100 Subject: rm pin_thd_affinity --- xmrstak/backend/cpu/minethd.hpp | 1 - 1 file changed, 1 deletion(-) (limited to 'xmrstak/backend/cpu/minethd.hpp') diff --git a/xmrstak/backend/cpu/minethd.hpp b/xmrstak/backend/cpu/minethd.hpp index c023fcb..5ffd44e 100644 --- a/xmrstak/backend/cpu/minethd.hpp +++ b/xmrstak/backend/cpu/minethd.hpp @@ -45,7 +45,6 @@ private: static miner_work oGlobalWork; miner_work oWork; - void pin_thd_affinity(); std::promise order_fix; std::thread oWorkThd; -- cgit v1.1