Added --cpu-priority option.

This commit is contained in:
XMRig 2017-08-15 08:19:55 +03:00
parent 61859dfe14
commit f05a328474
15 changed files with 136 additions and 6 deletions

View file

@ -98,7 +98,7 @@ void Workers::setJob(const Job &job)
}
void Workers::start(int64_t affinity)
void Workers::start(int64_t affinity, int priority)
{
const int threads = Mem::threads();
m_hashrate = new Hashrate(threads);
@ -114,7 +114,7 @@ void Workers::start(int64_t affinity)
uv_timer_start(&m_timer, Workers::onTick, 500, 500);
for (int i = 0; i < threads; ++i) {
Handle *handle = new Handle(i, threads, affinity);
Handle *handle = new Handle(i, threads, affinity, priority);
m_workers.push_back(handle);
handle->start(Workers::onReady);
}