From 8ce00adda4bb607f8bee5c69c8673921059ac3ce Mon Sep 17 00:00:00 2001 From: XMRig Date: Wed, 17 Jul 2019 14:54:08 +0700 Subject: [PATCH] Restored "CPU READY" message. --- CMakeLists.txt | 2 - src/api/v1/ApiRouter.cpp | 2 - src/backend/common/Thread.h | 5 +- src/backend/common/Workers.cpp | 13 +- src/backend/common/Workers.h | 1 + src/backend/common/interfaces/IBackend.h | 2 + src/backend/cpu/CpuBackend.cpp | 106 ++++++++-- src/backend/cpu/CpuBackend.h | 3 +- src/core/Miner.cpp | 9 +- src/crypto/common/VirtualMemory.h | 7 +- src/crypto/rx/Rx.cpp | 2 +- src/workers/WorkersLegacy.cpp | 256 ----------------------- src/workers/WorkersLegacy.h | 113 ---------- 13 files changed, 114 insertions(+), 407 deletions(-) delete mode 100644 src/workers/WorkersLegacy.cpp delete mode 100644 src/workers/WorkersLegacy.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 97491518e..89be20ecf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,6 @@ set(HEADERS src/Summary.h src/version.h src/workers/CpuThreadLegacy.h - src/workers/WorkersLegacy.h ) set(HEADERS_CRYPTO @@ -90,7 +89,6 @@ set(SOURCES src/net/strategies/DonateStrategy.cpp src/Summary.cpp src/workers/CpuThreadLegacy.cpp - src/workers/WorkersLegacy.cpp src/xmrig.cpp ) diff --git a/src/api/v1/ApiRouter.cpp b/src/api/v1/ApiRouter.cpp index 2e6a815c1..2a5bd3d0e 100644 --- a/src/api/v1/ApiRouter.cpp +++ b/src/api/v1/ApiRouter.cpp @@ -36,8 +36,6 @@ #include "core/config/Config.h" #include "rapidjson/document.h" #include "version.h" -//#include "workers/Hashrate.h" -#include "workers/WorkersLegacy.h" static inline rapidjson::Value normalize(double d) diff --git a/src/backend/common/Thread.h b/src/backend/common/Thread.h index f1d174ecf..b62d880cf 100644 --- a/src/backend/common/Thread.h +++ b/src/backend/common/Thread.h @@ -32,6 +32,7 @@ namespace xmrig { +class IBackend; class IWorker; @@ -39,10 +40,11 @@ template class Thread { public: - inline Thread(size_t index, const T &config) : m_index(index), m_config(config) {} + inline Thread(IBackend *backend, size_t index, const T &config) : m_index(index), m_config(config), m_backend(backend) {} inline ~Thread() { uv_thread_join(&m_thread); } inline const T &config() const { return m_config; } + inline IBackend *backend() const { return m_backend; } inline IWorker *worker() const { return m_worker; } inline size_t index() const { return m_index; } inline void setWorker(IWorker *worker) { m_worker = worker; } @@ -51,6 +53,7 @@ public: private: const size_t m_index = 0; const T m_config; + IBackend *m_backend; IWorker *m_worker = nullptr; uv_thread_t m_thread; }; diff --git a/src/backend/common/Workers.cpp b/src/backend/common/Workers.cpp index c4ac38a5d..629b564b5 100644 --- a/src/backend/common/Workers.cpp +++ b/src/backend/common/Workers.cpp @@ -25,6 +25,7 @@ #include "backend/common/Hashrate.h" +#include "backend/common/interfaces/IBackend.h" #include "backend/common/Workers.h" #include "backend/cpu/CpuWorker.h" #include "base/io/log/Log.h" @@ -48,6 +49,7 @@ public: Hashrate *hashrate = nullptr; + IBackend *backend = nullptr; }; @@ -79,7 +81,14 @@ const xmrig::Hashrate *xmrig::Workers::hashrate() const template void xmrig::Workers::add(const T &data) { - m_workers.push_back(new Thread(m_workers.size(), data)); + m_workers.push_back(new Thread(d_ptr->backend, m_workers.size(), data)); +} + + +template +void xmrig::Workers::setBackend(IBackend *backend) +{ + d_ptr->backend = backend; } @@ -176,7 +185,7 @@ void xmrig::Workers::onReady(void *arg) return; } - worker->start(); + handle->backend()->start(worker); } diff --git a/src/backend/common/Workers.h b/src/backend/common/Workers.h index 3ef4b015d..c13f5e77a 100644 --- a/src/backend/common/Workers.h +++ b/src/backend/common/Workers.h @@ -47,6 +47,7 @@ public: const Hashrate *hashrate() const; void add(const T &data); + void setBackend(IBackend *backend); void start(); void stop(); void tick(uint64_t ticks); diff --git a/src/backend/common/interfaces/IBackend.h b/src/backend/common/interfaces/IBackend.h index 69ed4c8c4..8ad7bb53c 100644 --- a/src/backend/common/interfaces/IBackend.h +++ b/src/backend/common/interfaces/IBackend.h @@ -33,6 +33,7 @@ namespace xmrig { class Hashrate; +class IWorker; class Job; class String; @@ -46,6 +47,7 @@ public: virtual const String &profileName() const = 0; virtual void printHashrate(bool details) = 0; virtual void setJob(const Job &job) = 0; + virtual void start(IWorker *worker) = 0; virtual void stop() = 0; virtual void tick(uint64_t ticks) = 0; }; diff --git a/src/backend/cpu/CpuBackend.cpp b/src/backend/cpu/CpuBackend.cpp index a04638323..bdb592fff 100644 --- a/src/backend/cpu/CpuBackend.cpp +++ b/src/backend/cpu/CpuBackend.cpp @@ -23,7 +23,11 @@ */ +#include + + #include "backend/common/Hashrate.h" +#include "backend/common/interfaces/IWorker.h" #include "backend/common/Workers.h" #include "backend/cpu/CpuBackend.h" #include "base/io/log/Log.h" @@ -31,6 +35,7 @@ #include "base/tools/String.h" #include "core/config/Config.h" #include "core/Controller.h" +#include "crypto/common/VirtualMemory.h" namespace xmrig { @@ -39,18 +44,41 @@ namespace xmrig { extern template class Threads; +struct LaunchStatus +{ +public: + inline void reset() + { + hugePages = 0; + memory = 0; + pages = 0; + started = 0; + threads = 0; + ways = 0; + } + + size_t hugePages; + size_t memory; + size_t pages; + size_t started; + size_t threads; + size_t ways; +}; + + class CpuBackendPrivate { public: - inline CpuBackendPrivate(const Miner *miner, Controller *controller) : - miner(miner), + inline CpuBackendPrivate(Controller *controller) : controller(controller) { + uv_mutex_init(&mutex); } inline ~CpuBackendPrivate() { + uv_mutex_destroy(&mutex); } @@ -72,11 +100,42 @@ public: } + inline void start(const Job &job) + { + const CpuConfig &cpu = controller->config()->cpu(); + + algo = job.algorithm(); + profileName = cpu.threads().profileName(job.algorithm()); + threads = cpu.threads().get(profileName); + + LOG_INFO(GREEN_BOLD("CPU") " use profile " BLUE_BG(WHITE_BOLD_S " %s ") WHITE_BOLD_S " (" CYAN_BOLD("%zu") WHITE_BOLD(" threads)") " scratchpad " CYAN_BOLD("%zu KB"), + profileName.data(), + threads.size(), + algo.memory() / 1024 + ); + + workers.stop(); + + status.reset(); + status.memory = algo.memory(); + status.threads = threads.size(); + + for (const CpuThread &thread : threads) { + workers.add(CpuLaunchData(controller->miner(), algo, cpu, thread)); + + status.ways += static_cast(thread.intensity()); + } + + workers.start(); + } + + Algorithm algo; - const Miner *miner; Controller *controller; CpuThreads threads; + LaunchStatus status; String profileName; + uv_mutex_t mutex; Workers workers; }; @@ -84,10 +143,10 @@ public: } // namespace xmrig -xmrig::CpuBackend::CpuBackend(const Miner *miner, Controller *controller) : - d_ptr(new CpuBackendPrivate(miner, controller)) +xmrig::CpuBackend::CpuBackend(Controller *controller) : + d_ptr(new CpuBackendPrivate(controller)) { - + d_ptr->workers.setBackend(this); } @@ -140,26 +199,33 @@ void xmrig::CpuBackend::setJob(const Job &job) return; } - const CpuConfig &cpu = d_ptr->controller->config()->cpu(); - const Threads &threads = cpu.threads(); + d_ptr->start(job); +} - d_ptr->algo = job.algorithm(); - d_ptr->profileName = threads.profileName(job.algorithm()); - d_ptr->threads = threads.get(d_ptr->profileName); - LOG_INFO(GREEN_BOLD("CPU") " use profile " BLUE_BG(WHITE_BOLD_S " %s ") WHITE_BOLD_S " (" CYAN_BOLD("%zu") WHITE_BOLD(" threads)") " scratchpad " CYAN_BOLD("%zu KB"), - d_ptr->profileName.data(), - d_ptr->threads.size(), - d_ptr->algo.memory() / 1024 - ); +void xmrig::CpuBackend::start(IWorker *worker) +{ + uv_mutex_lock(&d_ptr->mutex); - d_ptr->workers.stop(); + const auto pages = worker->memory()->hugePages(); - for (const CpuThread &thread : d_ptr->threads) { - d_ptr->workers.add(CpuLaunchData(d_ptr->miner, d_ptr->algo, cpu, thread)); + d_ptr->status.started++; + d_ptr->status.hugePages += pages.first; + d_ptr->status.pages += pages.second; + + if (d_ptr->status.started == d_ptr->status.threads) { + const double percent = d_ptr->status.hugePages == 0 ? 0.0 : static_cast(d_ptr->status.hugePages) / d_ptr->status.pages * 100.0; + const size_t memory = d_ptr->status.ways * d_ptr->status.memory / 1024; + + LOG_INFO(GREEN_BOLD("CPU READY") " threads " CYAN_BOLD("%zu(%zu)") " huge pages %s%zu/%zu %1.0f%%\x1B[0m memory " CYAN_BOLD("%zu KB") "", + d_ptr->status.threads, d_ptr->status.ways, + (d_ptr->status.hugePages == d_ptr->status.pages ? GREEN_BOLD_S : (d_ptr->status.hugePages == 0 ? RED_BOLD_S : YELLOW_BOLD_S)), + d_ptr->status.hugePages, d_ptr->status.pages, percent, memory); } - d_ptr->workers.start(); + uv_mutex_unlock(&d_ptr->mutex); + + worker->start(); } diff --git a/src/backend/cpu/CpuBackend.h b/src/backend/cpu/CpuBackend.h index a7b742eb4..aabccb49a 100644 --- a/src/backend/cpu/CpuBackend.h +++ b/src/backend/cpu/CpuBackend.h @@ -40,7 +40,7 @@ class Miner; class CpuBackend : public IBackend { public: - CpuBackend(const Miner *miner, Controller *controller); + CpuBackend(Controller *controller); ~CpuBackend() override; protected: @@ -48,6 +48,7 @@ protected: const String &profileName() const override; void printHashrate(bool details) override; void setJob(const Job &job) override; + void start(IWorker *worker) override; void stop() override; void tick(uint64_t ticks) override; diff --git a/src/core/Miner.cpp b/src/core/Miner.cpp index 1764a79e3..403216625 100644 --- a/src/core/Miner.cpp +++ b/src/core/Miner.cpp @@ -101,7 +101,7 @@ xmrig::Miner::Miner(Controller *controller) { d_ptr->timer = new Timer(this); - d_ptr->backends.push_back(new CpuBackend(this, controller)); + d_ptr->backends.push_back(new CpuBackend(controller)); } @@ -210,15 +210,8 @@ void xmrig::Miner::setJob(const Job &job, bool donate) void xmrig::Miner::stop() { -// xmrig::Handle::close(m_timer); -// m_hashrate->stop(); - Nonce::stop(); -// for (size_t i = 0; i < m_workers.size(); ++i) { -// m_workers[i]->join(); -// } - for (IBackend *backend : d_ptr->backends) { backend->stop(); } diff --git a/src/crypto/common/VirtualMemory.h b/src/crypto/common/VirtualMemory.h index e2a5ac222..44f77a23d 100644 --- a/src/crypto/common/VirtualMemory.h +++ b/src/crypto/common/VirtualMemory.h @@ -30,6 +30,7 @@ #include #include +#include namespace xmrig { @@ -43,10 +44,14 @@ public: ~VirtualMemory(); inline bool isHugePages() const { return m_flags & HUGEPAGES; } - inline size_t hugePages() const { return isHugePages() ? (align(size()) / 2097152) : 0; } inline size_t size() const { return m_size; } inline uint8_t *scratchpad() const { return m_scratchpad; } + inline std::pair hugePages() const + { + return std::pair(isHugePages() ? (align(size()) / 2097152) : 0, align(size()) / 2097152); + } + static void *allocateExecutableMemory(size_t size); static void *allocateLargePagesMemory(size_t size); static void flushInstructionCache(void *p, size_t size); diff --git a/src/crypto/rx/Rx.cpp b/src/crypto/rx/Rx.cpp index 630dd45a5..7f4820348 100644 --- a/src/crypto/rx/Rx.cpp +++ b/src/crypto/rx/Rx.cpp @@ -113,7 +113,7 @@ xmrig::RxDataset *xmrig::Rx::dataset(const uint8_t *seed, const Algorithm &algor const uint64_t ts = Chrono::steadyMSecs(); if (d_ptr->dataset->get() != nullptr) { - LOG_INFO("%s" MAGENTA_BOLD(" init dataset") " algo " WHITE_BOLD("%s") " threads " WHITE_BOLD("%u") BLACK_BOLD(" seed %s..."), + LOG_INFO("%s" MAGENTA_BOLD(" init dataset") " algo " WHITE_BOLD("%s (") CYAN_BOLD("%u") WHITE_BOLD(" threads)") BLACK_BOLD(" seed %s..."), tag, algorithm.shortName(), d_ptr->initThreads, diff --git a/src/workers/WorkersLegacy.cpp b/src/workers/WorkersLegacy.cpp deleted file mode 100644 index e71911160..000000000 --- a/src/workers/WorkersLegacy.cpp +++ /dev/null @@ -1,256 +0,0 @@ -/* XMRig - * Copyright 2010 Jeff Garzik - * Copyright 2012-2014 pooler - * Copyright 2014 Lucas Jones - * Copyright 2014-2016 Wolf9466 - * Copyright 2016 Jay D Dee - * Copyright 2017-2018 XMR-Stak , - * Copyright 2018-2019 SChernykh - * Copyright 2016-2019 XMRig , - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include -#include -#include - - -#include "api/Api.h" -#include "backend/cpu/CpuWorker.h" -#include "base/io/log/Log.h" -#include "base/tools/Chrono.h" -#include "base/tools/Handle.h" -#include "core/config/Config.h" -#include "core/Controller.h" -#include "crypto/common/Nonce.h" -#include "crypto/rx/RxAlgo.h" -#include "crypto/rx/RxCache.h" -#include "crypto/rx/RxDataset.h" -#include "rapidjson/document.h" -//#include "workers/Hashrate.h" -#include "workers/WorkersLegacy.h" - - -bool WorkersLegacy::m_active = false; -bool WorkersLegacy::m_enabled = true; -//Hashrate *WorkersLegacy::m_hashrate = nullptr; -xmrig::Job WorkersLegacy::m_job; -WorkersLegacy::LaunchStatus WorkersLegacy::m_status; -std::vector* > WorkersLegacy::m_workers; -uint64_t WorkersLegacy::m_ticks = 0; -uv_mutex_t WorkersLegacy::m_mutex; -uv_rwlock_t WorkersLegacy::m_rwlock; -//uv_timer_t *Workers::m_timer = nullptr; -xmrig::Controller *WorkersLegacy::m_controller = nullptr; - - -//xmrig::Job WorkersLegacy::job() -//{ -// uv_rwlock_rdlock(&m_rwlock); -// xmrig::Job job = m_job; -// uv_rwlock_rdunlock(&m_rwlock); - -// return job; -//} - - -//size_t WorkersLegacy::hugePages() -//{ -// uv_mutex_lock(&m_mutex); -// const size_t hugePages = m_status.hugePages; -// uv_mutex_unlock(&m_mutex); - -// return hugePages; -//} - - -//size_t WorkersLegacy::threads() -//{ -// uv_mutex_lock(&m_mutex); -// const size_t threads = m_status.threads; -// uv_mutex_unlock(&m_mutex); - -// return threads; -//} - - -//void Workers::pause() -//{ -// m_active = false; - -// xmrig::Nonce::pause(true); -// xmrig::Nonce::touch(); -//} - - -//void Workers::setEnabled(bool enabled) -//{ -// if (m_enabled == enabled) { -// return; -// } - -// m_enabled = enabled; -// if (!m_active) { -// return; -// } - -// xmrig::Nonce::pause(!enabled); -// xmrig::Nonce::touch(); -//} - - -//void Workers::setJob(const xmrig::Job &job, bool donate) -//{ -// uv_rwlock_wrlock(&m_rwlock); - -// m_job = job; -// m_job.setIndex(donate ? 1 : 0); - -// xmrig::Nonce::reset(donate ? 1 : 0); - -// uv_rwlock_wrunlock(&m_rwlock); - -// m_active = true; -// if (!m_enabled) { -// return; -// } - -// xmrig::Nonce::pause(false); -//} - - -void WorkersLegacy::start(xmrig::Controller *controller) -{ - using namespace xmrig; - -# ifdef APP_DEBUG - LOG_NOTICE("THREADS ------------------------------------------------------------------"); - for (const xmrig::IThread *thread : controller->config()->threads()) { - thread->print(); - } - LOG_NOTICE("--------------------------------------------------------------------------"); -# endif - - m_controller = controller; - - m_status.algo = xmrig::Algorithm::RX_WOW; // FIXME algo - const CpuThreads &threads = controller->config()->cpu().threads().get(m_status.algo); - m_status.threads = threads.size(); - - for (const CpuThread &thread : threads) { - m_status.ways += thread.intensity(); - } - -// m_hashrate = new Hashrate(threads.size(), controller); - - uv_mutex_init(&m_mutex); - uv_rwlock_init(&m_rwlock); - -// m_timer = new uv_timer_t; -// uv_timer_init(uv_default_loop(), m_timer); -// uv_timer_start(m_timer, Workers::onTick, 500, 500); - -// size_t index = 0; -// for (const CpuThread &thread : threads) { -// Thread *handle = new Thread(index++, CpuLaunchData(m_status.algo, controller->config()->cpu(), thread)); - -// m_workers.push_back(handle); -// handle->start(WorkersLegacy::onReady); -// } -} - - -//void Workers::stop() -//{ -// xmrig::Handle::close(m_timer); -// m_hashrate->stop(); - -// xmrig::Nonce::stop(); - -// for (size_t i = 0; i < m_workers.size(); ++i) { -// m_workers[i]->join(); -// } -//} - - -//#ifdef XMRIG_FEATURE_API -//void WorkersLegacy::threadsSummary(rapidjson::Document &doc) -//{ -// uv_mutex_lock(&m_mutex); -// const uint64_t pages[2] = { m_status.hugePages, m_status.pages }; -// const uint64_t memory = m_status.ways * xmrig::CnAlgo<>::memory(m_status.algo); -// uv_mutex_unlock(&m_mutex); - -// auto &allocator = doc.GetAllocator(); - -// rapidjson::Value hugepages(rapidjson::kArrayType); -// hugepages.PushBack(pages[0], allocator); -// hugepages.PushBack(pages[1], allocator); - -// doc.AddMember("hugepages", hugepages, allocator); -// doc.AddMember("memory", memory, allocator); -//} -//#endif - - -//void WorkersLegacy::onTick(uv_timer_t *) -//{ -// using namespace xmrig; - -// for (Thread *handle : m_workers) { -// if (!handle->worker()) { -// return; -// } - -// m_hashrate->add(handle->index(), handle->worker()->hashCount(), handle->worker()->timestamp()); -// } - -// if ((m_ticks++ & 0xF) == 0) { -// m_hashrate->updateHighest(); -// } -//} - - -void WorkersLegacy::start(xmrig::IWorker *worker) -{ -// const Worker *w = static_cast(worker); - - uv_mutex_lock(&m_mutex); - m_status.started++; -// m_status.pages += w->memory().pages; -// m_status.hugePages += w->memory().hugePages; - - if (m_status.started == m_status.threads) { - const double percent = (double) m_status.hugePages / m_status.pages * 100.0; - const size_t memory = m_status.ways * xmrig::CnAlgo<>::memory(m_status.algo) / 1024; - -# ifdef XMRIG_ALGO_RANDOMX - if (m_status.algo.family() == xmrig::Algorithm::RANDOM_X) { - LOG_INFO(GREEN_BOLD("READY (CPU)") " threads " CYAN_BOLD("%zu(%zu)") " memory " CYAN_BOLD("%zu KB") "", - m_status.threads, m_status.ways, memory); - } else -# endif - { - LOG_INFO(GREEN_BOLD("READY (CPU)") " threads " CYAN_BOLD("%zu(%zu)") " huge pages %s%zu/%zu %1.0f%%\x1B[0m memory " CYAN_BOLD("%zu KB") "", - m_status.threads, m_status.ways, - (m_status.hugePages == m_status.pages ? GREEN_BOLD_S : (m_status.hugePages == 0 ? RED_BOLD_S : YELLOW_BOLD_S)), - m_status.hugePages, m_status.pages, percent, memory); - } - } - - uv_mutex_unlock(&m_mutex); - - worker->start(); -} diff --git a/src/workers/WorkersLegacy.h b/src/workers/WorkersLegacy.h deleted file mode 100644 index d8ab1e59d..000000000 --- a/src/workers/WorkersLegacy.h +++ /dev/null @@ -1,113 +0,0 @@ -/* XMRig - * Copyright 2010 Jeff Garzik - * Copyright 2012-2014 pooler - * Copyright 2014 Lucas Jones - * Copyright 2014-2016 Wolf9466 - * Copyright 2016 Jay D Dee - * Copyright 2017-2018 XMR-Stak , - * Copyright 2018-2019 SChernykh - * Copyright 2016-2019 XMRig , - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef XMRIG_WORKERSLEGACY_H -#define XMRIG_WORKERSLEGACY_H - - -#include -#include -#include -#include - -#ifdef XMRIG_ALGO_RANDOMX -# include -#endif - -#include "backend/common/Thread.h" -#include "backend/cpu/CpuLaunchData.h" -#include "base/net/stratum/Job.h" -#include "net/JobResult.h" -#include "rapidjson/fwd.h" - - -//class Hashrate; - - -namespace xmrig { - class IWorker; - class Controller; - class ThreadHandle; -} - - -class WorkersLegacy -{ -public: -// static size_t hugePages(); -// static size_t threads(); -// static void pause(); -// static void printHashrate(bool detail); -// static void setEnabled(bool enabled); -// static void setJob(const xmrig::Job &job, bool donate); - static void start(xmrig::Controller *controller); -// static void stop(); -// static xmrig::Job job(); - -// static inline bool isEnabled() { return m_enabled; } -// static inline Hashrate *hashrate() { return m_hashrate; } - -//# ifdef XMRIG_FEATURE_API -// static void threadsSummary(rapidjson::Document &doc); -//# endif - -private: -// static void onReady(void *arg); -// static void onTick(uv_timer_t *handle); - static void start(xmrig::IWorker *worker); - - class LaunchStatus - { - public: - inline LaunchStatus() : - hugePages(0), - pages(0), - started(0), - threads(0), - ways(0) - {} - - size_t hugePages; - size_t pages; - size_t started; - size_t threads; - size_t ways; - xmrig::Algorithm algo; - }; - - static bool m_active; - static bool m_enabled; -// static Hashrate *m_hashrate; - static xmrig::Job m_job; - static LaunchStatus m_status; - static std::vector* > m_workers; - static uint64_t m_ticks; - static uv_mutex_t m_mutex; - static uv_rwlock_t m_rwlock; -// static uv_timer_t *m_timer; - static xmrig::Controller *m_controller; -}; - - -#endif /* XMRIG_WORKERSLEGACY_H */