1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-25 05:40:39 -05:00
This commit is contained in:
pusheaxpopebx
2023-04-12 11:30:55 +09:00
committed by GitHub
4 changed files with 11 additions and 5 deletions

View File

@@ -232,8 +232,8 @@ bool xmrig::CpuWorker<N>::selfTest()
template<size_t N>
void xmrig::CpuWorker<N>::hashrateData(uint64_t &hashCount, uint64_t &, uint64_t &rawHashes) const
{
hashCount = m_count;
rawHashes = m_count;
hashCount = m_count.load(std::memory_order_relaxed);
rawHashes = hashCount;
}
@@ -351,7 +351,8 @@ void xmrig::CpuWorker<N>::start()
JobResults::submit(job, current_job_nonces[i], m_hash + (i * 32), job.hasMinerSignature() ? miner_signature_saved : nullptr);
}
}
m_count += N;
m_count.fetch_add(N, std::memory_order_relaxed);
}
if (m_yield) {

View File

@@ -107,6 +107,8 @@ private:
# ifdef XMRIG_FEATURE_BENCHMARK
uint32_t m_benchSize = 0;
# endif
std::atomic<uint64_t> m_count = {0};
};