Job flow WIP.

This commit is contained in:
XMRig 2017-06-11 06:52:23 +03:00
parent bcef4b12ec
commit 3ad11685cc
14 changed files with 126 additions and 25 deletions

View file

@ -22,17 +22,23 @@
*/
#include "Cpu.h"
#include "Mem.h"
#include "workers/Handle.h"
#include "workers/Worker.h"
#include "Mem.h"
Worker::Worker(Handle *handle) :
m_nicehash(handle->nicehash()),
m_handle(handle),
m_id(handle->id())
m_id(handle->threadId())
{
m_handle->setWorker(this);
if (Cpu::threads() > 1 && m_handle->affinity() != -1L) {
Cpu::setAffinity(m_id, m_handle->affinity());
}
m_ctx = Mem::create(m_id);
}