summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/nvidia/minethd.cpp
diff options
context:
space:
mode:
authorfireice-uk <fireice-uk@users.noreply.github.com>2017-11-16 15:25:08 +0000
committerGitHub <noreply@github.com>2017-11-16 15:25:08 +0000
commit036ffa887272b0c27197f78a6082b903ace1a344 (patch)
tree2b5dc47b60d3b1d001a0bf4830b7bf47d253190c /xmrstak/backend/nvidia/minethd.cpp
parent1dc874c542a23c36dd65ea0f5b9cb65e3c3a572a (diff)
parentcabd46f39fdadad7345f9603ccdcf1daf49e1a9c (diff)
downloadxmr-stak-036ffa887272b0c27197f78a6082b903ace1a344.zip
xmr-stak-036ffa887272b0c27197f78a6082b903ace1a344.tar.gz
Merge pull request #126 from psychocrypt/topic-removeSpaceIndentionWithTabs
remove space indention with tabs
Diffstat (limited to 'xmrstak/backend/nvidia/minethd.cpp')
-rw-r--r--xmrstak/backend/nvidia/minethd.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/xmrstak/backend/nvidia/minethd.cpp b/xmrstak/backend/nvidia/minethd.cpp
index 9dbd83e..9eab1c0 100644
--- a/xmrstak/backend/nvidia/minethd.cpp
+++ b/xmrstak/backend/nvidia/minethd.cpp
@@ -59,11 +59,11 @@ namespace nvidia
{
#ifdef WIN32
- HINSTANCE lib_handle;
+ HINSTANCE lib_handle;
#else
- void *lib_handle;
+ void *lib_handle;
#endif
-
+
minethd::minethd(miner_work& pWork, size_t iNo, const jconf::thd_cfg& cfg)
{
this->backendType = iBackend::NVIDIA;
@@ -81,7 +81,7 @@ minethd::minethd(miner_work& pWork, size_t iNo, const jconf::thd_cfg& cfg)
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);
order_guard.wait();
@@ -113,7 +113,7 @@ bool minethd::self_test()
//if(!bResult)
// printer::inst()->print_msg(L0,
- // "Cryptonight hash self-test failed. This might be caused by bad compiler optimizations.");
+ // "Cryptonight hash self-test failed. This might be caused by bad compiler optimizations.");
return bResult;
}
@@ -211,7 +211,7 @@ void minethd::work_main()
std::unique_lock<std::mutex> lck(thd_aff_set);
lck.release();
std::this_thread::yield();
-
+
uint64_t iCount = 0;
cryptonight_ctx* cpu_ctx;
cpu_ctx = cpu::minethd::minethd_alloc_ctx();
@@ -227,14 +227,15 @@ void minethd::work_main()
}
bool mineMonero = strcmp_i(::jconf::inst()->GetCurrency(), "monero");
-
+
while (bQuit == 0)
{
if (oWork.bStall)
{
- /* We are stalled here because the executor didn't find a job for us yet,
- either because of network latency, or a socket problem. Since we are
- raison d'etre of this software it us sensible to just wait until we have something*/
+ /* We are stalled here because the executor didn't find a job for us yet,
+ * either because of network latency, or a socket problem. Since we are
+ * raison d'etre of this software it us sensible to just wait until we have something
+ */
while (globalStates::inst().iGlobalJobNo.load(std::memory_order_relaxed) == iJobNo)
std::this_thread::sleep_for(std::chrono::milliseconds(100));
OpenPOWER on IntegriCloud