Job flow WIP.

This commit is contained in:
XMRig 2017-06-11 06:52:23 +03:00
parent bcef4b12ec
commit 3ad11685cc
14 changed files with 126 additions and 25 deletions

View file

@ -26,6 +26,7 @@
#include <pthread.h>
#include <stdint.h>
class IWorker;
@ -34,14 +35,18 @@ class IWorker;
class Handle
{
public:
Handle(int id);
Handle(int threadId, int64_t affinity, bool nicehash);
void start(void *(*callback) (void *));
inline int id() const { return m_id; }
inline bool nicehash() const { return m_nicehash; }
inline int threadId() const { return m_threadId; }
inline int64_t affinity() const { return m_affinity; }
inline void setWorker(IWorker *worker) { m_worker = worker; }
private:
int m_id;
bool m_nicehash;
int m_threadId;
int64_t m_affinity;
IWorker *m_worker;
pthread_t m_thread;
};