This commit is contained in:
MoneroOcean 2019-12-04 10:52:07 -08:00
commit f3e6423e9d
28 changed files with 65 additions and 72 deletions

View file

@ -176,10 +176,6 @@ int xmrig::Base::init()
Platform::init(config()->userAgent());
# ifndef XMRIG_PROXY_PROJECT
Platform::setProcessPriority(config()->cpu().priority());
# endif
if (isBackground()) {
Log::background = true;
}

View file

@ -51,7 +51,6 @@ public:
static uint32_t setTimerResolution(uint32_t resolution);
static void init(const char *userAgent);
static void restoreTimerResolution();
static void setProcessPriority(int priority);
static void setThreadPriority(int priority);
static inline const char *userAgent() { return m_userAgent; }

View file

@ -83,11 +83,6 @@ void xmrig::Platform::restoreTimerResolution()
}
void xmrig::Platform::setProcessPriority(int priority)
{
}
void xmrig::Platform::setThreadPriority(int priority)
{
if (priority == -1) {

View file

@ -111,11 +111,6 @@ void xmrig::Platform::restoreTimerResolution()
}
void xmrig::Platform::setProcessPriority(int priority)
{
}
void xmrig::Platform::setThreadPriority(int priority)
{
if (priority == -1) {

View file

@ -131,43 +131,6 @@ void xmrig::Platform::restoreTimerResolution()
}
void xmrig::Platform::setProcessPriority(int priority)
{
if (priority == -1) {
return;
}
DWORD prio = IDLE_PRIORITY_CLASS;
switch (priority)
{
case 1:
prio = BELOW_NORMAL_PRIORITY_CLASS;
break;
case 2:
prio = NORMAL_PRIORITY_CLASS;
break;
case 3:
prio = ABOVE_NORMAL_PRIORITY_CLASS;
break;
case 4:
prio = HIGH_PRIORITY_CLASS;
break;
case 5:
prio = REALTIME_PRIORITY_CLASS;
break;
default:
break;
}
SetPriorityClass(GetCurrentProcess(), prio);
}
void xmrig::Platform::setThreadPriority(int priority)
{
if (priority == -1) {

View file

@ -95,6 +95,7 @@ public:
RandomXModeKey = 1029,
CPUMaxThreadsKey = 1026,
MemoryPoolKey = 1027,
YieldKey = 1030,
// xmrig amd
OclPlatformKey = 1400,