Update std implementation

Update std implementation for UNIX.
This commit is contained in:
enWILLYado 2018-02-26 21:36:21 +01:00
parent 373129a7e8
commit 8041771e9d
11 changed files with 15 additions and 6 deletions

View file

@ -27,6 +27,7 @@
#include <errno.h>
#include <unistd.h>
#include "interfaces/interface.h"
#include "App.h"
#include "Cpu.h"

View file

@ -25,6 +25,8 @@
#include "Console.h"
#include "interfaces/IConsoleListener.h"
#include "interfaces/interface.h"
Console::Console(IConsoleListener* listener)
: m_listener(listener)

View file

@ -84,8 +84,8 @@ int Cpu::optimalThreadsCount(int algo, bool doubleHash, int maxCpuUsage)
void Cpu::initCommon()
{
struct cpu_raw_data_t raw = { 0 };
struct cpu_id_t data = { 0 };
struct cpu_raw_data_t raw;
struct cpu_id_t data;;
cpuid_get_raw_data(&raw);
cpu_identify(&raw, &data);

View file

@ -37,6 +37,7 @@
#include <microhttpd.h>
#endif
#include "interfaces/interface.h"
#include "Cpu.h"
#include "donate.h"

View file

@ -28,7 +28,9 @@
#include <string.h>
#include <sys/resource.h>
#include <uv.h>
#include <sched.h>
#include "log/Log.h"
#include "Platform.h"
#include "version.h"
@ -126,9 +128,12 @@ void Platform::setThreadPriority(int priority)
if(sched_setscheduler(0, SCHED_IDLE, &param) != 0)
{
sched_setscheduler(0, SCHED_BATCH, &param);
const int err = sched_setscheduler(0, SCHED_BATCH, &param);
LOG_WARN("SCHED_BATCH priority: " << err << ".");
}
}
#else
LOG_INFO("NONE priority.");
# endif
}

View file

@ -28,6 +28,7 @@
#include <uv.h>
#include <string>
#include "interfaces/interface.h"
class ApiState;
class Hashrate;

View file

@ -24,7 +24,6 @@
#ifndef __ICONSOLELISTENER_H__
#define __ICONSOLELISTENER_H__
#include "interfaces/interface.h"
class IConsoleListener
{

View file

@ -26,6 +26,7 @@
#include <algorithm>
#include "net/Url.h"
#include "interfaces/interface.h"
#ifdef _MSC_VER
#define strncasecmp(x,y,z) _strnicmp(x,y,z)

View file

@ -23,6 +23,7 @@
#include "workers/Handle.h"
#include "interfaces/interface.h"
Handle::Handle(int threadId, int threads, int64_t affinity, int priority) :

View file

@ -28,7 +28,6 @@
#include <stdint.h>
#include <uv.h>
#include "interfaces/interface.h"
class IWorker;

View file

@ -31,7 +31,6 @@
#include "net/Job.h"
#include "net/JobResult.h"
#include "interfaces/interface.h"
class Handle;
class Hashrate;