Update std implementation
Update std implementation for UNIX.
This commit is contained in:
parent
373129a7e8
commit
8041771e9d
11 changed files with 15 additions and 6 deletions
|
@ -27,6 +27,7 @@
|
|||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "interfaces/interface.h"
|
||||
|
||||
#include "App.h"
|
||||
#include "Cpu.h"
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#include "Console.h"
|
||||
#include "interfaces/IConsoleListener.h"
|
||||
|
||||
#include "interfaces/interface.h"
|
||||
|
||||
|
||||
Console::Console(IConsoleListener* listener)
|
||||
: m_listener(listener)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include <microhttpd.h>
|
||||
#endif
|
||||
|
||||
#include "interfaces/interface.h"
|
||||
|
||||
#include "Cpu.h"
|
||||
#include "donate.h"
|
||||
|
|
|
@ -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, ¶m) != 0)
|
||||
{
|
||||
sched_setscheduler(0, SCHED_BATCH, ¶m);
|
||||
const int err = sched_setscheduler(0, SCHED_BATCH, ¶m);
|
||||
LOG_WARN("SCHED_BATCH priority: " << err << ".");
|
||||
}
|
||||
}
|
||||
#else
|
||||
LOG_INFO("NONE priority.");
|
||||
# endif
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <uv.h>
|
||||
#include <string>
|
||||
|
||||
#include "interfaces/interface.h"
|
||||
|
||||
class ApiState;
|
||||
class Hashrate;
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#ifndef __ICONSOLELISTENER_H__
|
||||
#define __ICONSOLELISTENER_H__
|
||||
|
||||
#include "interfaces/interface.h"
|
||||
|
||||
class IConsoleListener
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
|
||||
#include "workers/Handle.h"
|
||||
#include "interfaces/interface.h"
|
||||
|
||||
|
||||
Handle::Handle(int threadId, int threads, int64_t affinity, int priority) :
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <stdint.h>
|
||||
#include <uv.h>
|
||||
|
||||
#include "interfaces/interface.h"
|
||||
|
||||
class IWorker;
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "net/Job.h"
|
||||
#include "net/JobResult.h"
|
||||
|
||||
#include "interfaces/interface.h"
|
||||
|
||||
class Handle;
|
||||
class Hashrate;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue