Added RandomX option "wrmsr" with command line equivalent --randomx-wrmsr=N.

This commit is contained in:
XMRig 2019-12-10 23:57:29 +07:00
parent 3b4b230cab
commit 96cfdda9a1
No known key found for this signature in database
GPG key ID: 446A53638BE94409
14 changed files with 257 additions and 192 deletions

View file

@ -39,8 +39,9 @@ namespace xmrig {
class RxPrivate;
static const char *tag = BLUE_BG(WHITE_BOLD_S " rx ") " ";
static RxPrivate *d_ptr = nullptr;
static bool osInitialized = false;
static const char *tag = BLUE_BG(WHITE_BOLD_S " rx ") " ";
static RxPrivate *d_ptr = nullptr;
class RxPrivate
@ -71,6 +72,11 @@ bool xmrig::Rx::init(const Job &job, const RxConfig &config, const CpuConfig &cp
return true;
}
if (!osInitialized) {
osInit(config);
osInitialized = true;
}
d_ptr->queue.enqueue(job, config.nodeset(), config.threads(cpu.limit()), cpu.isHugePages(), config.isOneGbPages(), config.mode(), cpu.priority());
return false;
@ -107,3 +113,10 @@ void xmrig::Rx::init(IRxListener *listener)
{
d_ptr = new RxPrivate(listener);
}
#ifndef XMRIG_OS_LINUX
void xmrig::Rx::osInit(const RxConfig &)
{
}
#endif