mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 10:01:06 +00:00
Removed no longer required code.
This commit is contained in:
parent
6f27037f07
commit
be7ff62c48
5 changed files with 3 additions and 16 deletions
|
@ -26,10 +26,8 @@
|
|||
#include "workers/ThreadHandle.h"
|
||||
|
||||
|
||||
ThreadHandle::ThreadHandle(xmrig::IThread *config, uint32_t offset, size_t totalWays) :
|
||||
ThreadHandle::ThreadHandle(xmrig::IThread *config) :
|
||||
m_worker(nullptr),
|
||||
m_totalWays(totalWays),
|
||||
m_offset(offset),
|
||||
m_config(config)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -40,21 +40,17 @@ class IWorker;
|
|||
class ThreadHandle
|
||||
{
|
||||
public:
|
||||
ThreadHandle(xmrig::IThread *config, uint32_t offset, size_t totalWays);
|
||||
ThreadHandle(xmrig::IThread *config);
|
||||
void join();
|
||||
void start(void (*callback) (void *));
|
||||
|
||||
inline IWorker *worker() const { return m_worker; }
|
||||
inline size_t threadId() const { return m_config->index(); }
|
||||
inline size_t totalWays() const { return m_totalWays; }
|
||||
inline uint32_t offset() const { return m_offset; }
|
||||
inline void setWorker(IWorker *worker) { assert(worker != nullptr); m_worker = worker; }
|
||||
inline xmrig::IThread *config() const { return m_config; }
|
||||
|
||||
private:
|
||||
IWorker *m_worker;
|
||||
size_t m_totalWays;
|
||||
uint32_t m_offset;
|
||||
uv_thread_t m_thread;
|
||||
xmrig::IThread *m_config;
|
||||
};
|
||||
|
|
|
@ -35,8 +35,6 @@
|
|||
|
||||
Worker::Worker(ThreadHandle *handle) :
|
||||
m_id(handle->threadId()),
|
||||
m_totalWays(handle->totalWays()),
|
||||
m_offset(handle->offset()),
|
||||
m_hashCount(0),
|
||||
m_timestamp(0),
|
||||
m_count(0),
|
||||
|
|
|
@ -57,8 +57,6 @@ protected:
|
|||
void storeStats();
|
||||
|
||||
const size_t m_id;
|
||||
const size_t m_totalWays;
|
||||
const uint32_t m_offset;
|
||||
MemInfo m_memory;
|
||||
std::atomic<uint64_t> m_hashCount;
|
||||
std::atomic<uint64_t> m_timestamp;
|
||||
|
|
|
@ -200,11 +200,8 @@ void Workers::start(xmrig::Controller *controller)
|
|||
uv_timer_init(uv_default_loop(), m_timer);
|
||||
uv_timer_start(m_timer, Workers::onTick, 500, 500);
|
||||
|
||||
uint32_t offset = 0;
|
||||
|
||||
for (xmrig::IThread *thread : threads) {
|
||||
ThreadHandle *handle = new ThreadHandle(thread, offset, m_status.ways);
|
||||
offset += thread->multiway();
|
||||
ThreadHandle *handle = new ThreadHandle(thread);
|
||||
|
||||
m_workers.push_back(handle);
|
||||
handle->start(Workers::onReady);
|
||||
|
|
Loading…
Reference in a new issue