Job flow WIP.
This commit is contained in:
parent
bcef4b12ec
commit
3ad11685cc
14 changed files with 126 additions and 25 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue