summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/amd/minethd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xmrstak/backend/amd/minethd.cpp')
-rw-r--r--xmrstak/backend/amd/minethd.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/xmrstak/backend/amd/minethd.cpp b/xmrstak/backend/amd/minethd.cpp
index 185e717..6d348b9 100644
--- a/xmrstak/backend/amd/minethd.cpp
+++ b/xmrstak/backend/amd/minethd.cpp
@@ -231,10 +231,11 @@ void minethd::work_main()
if((round_ctr++ & 0xF) == 0)
{
globalStates::inst().calc_start_nonce(pGpuCtx->Nonce, oWork.bNiceHash, h_per_round * 16);
+ // check if the job is still valid, there is a small possibility that the job is switched
+ if(globalStates::inst().iGlobalJobNo.load(std::memory_order_relaxed) != iJobNo)
+ break;
}
- // check if the job is still valid, there is a small posibility that the job is switched
- if(globalStates::inst().iGlobalJobNo.load(std::memory_order_relaxed) != iJobNo)
- break;
+
cl_uint results[0x100];
memset(results,0,sizeof(cl_uint)*(0x100));
OpenPOWER on IntegriCloud