1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-26 14:02:53 -05:00

Draft merge

This commit is contained in:
MoneroOcean
2019-06-18 11:17:00 -07:00
217 changed files with 13224 additions and 4105 deletions

View File

@@ -32,14 +32,15 @@
#include <uv.h>
#include <vector>
#include "common/net/Job.h"
#include "base/net/stratum/Job.h"
#include "net/JobResult.h"
#include "rapidjson/fwd.h"
#include "randomwow.h"
class Handle;
class Hashrate;
class IWorker;
class ThreadHandle;
namespace xmrig {
@@ -71,10 +72,13 @@ public:
static inline void pause() { m_active = false; m_paused = 1; m_sequence++; }
static inline void setListener(xmrig::IJobResultListener *listener) { m_listener = listener; }
# ifndef XMRIG_NO_API
# ifdef XMRIG_FEATURE_API
static void threadsSummary(rapidjson::Document &doc);
# endif
static void updateDataset(const uint8_t* seed_hash, uint32_t num_threads);
static randomx_dataset* getDataset();
private:
static void onReady(void *arg);
static void onResult(uv_async_t *handle);
@@ -86,7 +90,6 @@ private:
{
public:
inline LaunchStatus() :
colors(true),
hugePages(0),
pages(0),
started(0),
@@ -95,7 +98,6 @@ private:
algo(xmrig::CRYPTONIGHT)
{}
bool colors;
size_t hugePages;
size_t pages;
size_t started;
@@ -113,13 +115,19 @@ private:
static std::atomic<int> m_paused;
static std::atomic<uint64_t> m_sequence;
static std::list<xmrig::JobResult> m_queue;
static std::vector<Handle*> m_workers;
static std::vector<ThreadHandle*> m_workers;
static uint64_t m_ticks;
static uv_async_t m_async;
static uv_async_t *m_async;
static uv_mutex_t m_mutex;
static uv_rwlock_t m_rwlock;
static uv_timer_t m_timer;
static uv_timer_t *m_timer;
static xmrig::Controller *m_controller;
static uv_rwlock_t m_rx_dataset_lock;
static randomx_cache *m_rx_cache;
static randomx_dataset *m_rx_dataset;
static uint8_t m_rx_seed_hash[32];
static std::atomic<uint32_t> m_rx_dataset_init_thread_counter;
};