Removed CPU specific code from Worker class.

This commit is contained in:
XMRig 2019-07-14 00:35:38 +07:00
parent ee434a5708
commit dff59fabc2
7 changed files with 39 additions and 44 deletions

View file

@ -34,6 +34,7 @@
#include "crypto/rx/RxVm.h"
#include "net/JobResults.h"
#include "workers/CpuThreadLegacy.h"
#include "workers/ThreadHandle.h"
#include "workers/Workers.h"
@ -45,8 +46,9 @@ static constexpr uint32_t kReserveCount = 4096;
template<size_t N>
xmrig::CpuWorker<N>::CpuWorker(ThreadHandle *handle)
: Worker(handle)
xmrig::CpuWorker<N>::CpuWorker(ThreadHandle *handle) :
Worker(handle->threadId(), handle->config()->affinity(), handle->config()->priority()),
m_thread(static_cast<xmrig::CpuThreadLegacy *>(handle->config()))
{
if (m_thread->algorithm().family() != Algorithm::RANDOM_X) {
m_memory = Mem::create(m_ctx, m_thread->algorithm(), N);