summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/amd
diff options
context:
space:
mode:
authorfireice-uk <fireice-uk@users.noreply.github.com>2017-11-15 15:34:21 +0000
committerpsychocrypt <psychocrypt@users.noreply.github.com>2017-11-15 16:34:21 +0100
commit117493dc5359572a171c7ffb9b55da6740593089 (patch)
treeeae5efff99a00138043680408edacd2397c1e86d /xmrstak/backend/amd
parent288363814fb091ccfc452f0408bfa53727fc30c0 (diff)
downloadxmr-stak-117493dc5359572a171c7ffb9b55da6740593089.zip
xmr-stak-117493dc5359572a171c7ffb9b55da6740593089.tar.gz
Fix misc bugs (#117)
* CONF_NO_TLS fix * gpu error fix + always return to sched after pin
Diffstat (limited to 'xmrstak/backend/amd')
-rw-r--r--xmrstak/backend/amd/minethd.cpp6
-rw-r--r--xmrstak/backend/amd/minethd.hpp1
2 files changed, 6 insertions, 1 deletions
diff --git a/xmrstak/backend/amd/minethd.cpp b/xmrstak/backend/amd/minethd.cpp
index 912587b..94fc088 100644
--- a/xmrstak/backend/amd/minethd.cpp
+++ b/xmrstak/backend/amd/minethd.cpp
@@ -59,6 +59,7 @@ minethd::minethd(miner_work& pWork, size_t iNo, GpuContext* ctx, const jconf::th
pGpuCtx = ctx;
this->affinity = cfg.cpu_aff;
+ std::unique_lock<std::mutex> lck(thd_aff_set);
std::future<void> order_guard = order_fix.get_future();
oWorkThd = std::thread(&minethd::work_main, this);
@@ -180,6 +181,9 @@ void minethd::work_main()
bindMemoryToNUMANode(affinity);
order_fix.set_value();
+ std::unique_lock<std::mutex> lck(thd_aff_set);
+ lck.release();
+ std::this_thread::yield();
uint64_t iCount = 0;
cryptonight_ctx* cpu_ctx;
@@ -239,7 +243,7 @@ void minethd::work_main()
if ( (*((uint64_t*)(bResult + 24))) < oWork.iTarget)
executor::inst()->push_event(ex_event(job_result(oWork.sJobID, results[i], bResult), oWork.iPoolId));
else
- executor::inst()->log_result_error("AMD Invalid Result");
+ executor::inst()->push_event(ex_event("AMD Invalid Result", oWork.iPoolId));
}
iCount += pGpuCtx->rawIntensity;
diff --git a/xmrstak/backend/amd/minethd.hpp b/xmrstak/backend/amd/minethd.hpp
index c4c2ce6..c808192 100644
--- a/xmrstak/backend/amd/minethd.hpp
+++ b/xmrstak/backend/amd/minethd.hpp
@@ -38,6 +38,7 @@ private:
miner_work oWork;
std::promise<void> order_fix;
+ std::mutex thd_aff_set;
std::thread oWorkThd;
int64_t affinity;
OpenPOWER on IntegriCloud