Removed non thread safe access to config.
This commit is contained in:
parent
ee677ef5c9
commit
926871cbe1
13 changed files with 24 additions and 27 deletions
|
@ -86,6 +86,7 @@ xmrig::CpuWorker<N>::CpuWorker(size_t id, const CpuLaunchData &data) :
|
|||
m_av(data.av()),
|
||||
m_astrobwtMaxSize(data.astrobwtMaxSize * 1000),
|
||||
m_miner(data.miner),
|
||||
m_threads(data.threads),
|
||||
m_benchSize(data.benchSize),
|
||||
m_ctx()
|
||||
{
|
||||
|
@ -199,7 +200,7 @@ bool xmrig::CpuWorker<N>::selfTest()
|
|||
|
||||
|
||||
template<size_t N>
|
||||
void xmrig::CpuWorker<N>::start(xmrig::Config* config)
|
||||
void xmrig::CpuWorker<N>::start()
|
||||
{
|
||||
while (Nonce::sequence(Nonce::CPU) > 0) {
|
||||
if (Nonce::isPaused()) {
|
||||
|
@ -220,10 +221,6 @@ void xmrig::CpuWorker<N>::start(xmrig::Config* config)
|
|||
alignas(16) uint64_t tempHash[8] = {};
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_FEATURE_BENCHMARK
|
||||
const size_t benchThreads = config->cpu().threads().get(m_job.currentJob().algorithm()).count();
|
||||
# endif
|
||||
|
||||
while (!Nonce::isOutdated(Nonce::CPU, m_job.sequence())) {
|
||||
const Job &job = m_job.currentJob();
|
||||
|
||||
|
@ -253,7 +250,7 @@ void xmrig::CpuWorker<N>::start(xmrig::Config* config)
|
|||
}
|
||||
|
||||
// Make each hash dependent on the previous one in single thread benchmark to prevent cheating with multiple threads
|
||||
if (benchThreads == 1) {
|
||||
if (m_threads == 1) {
|
||||
*(uint64_t*)(m_job.blob()) ^= m_benchData;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue