mirror of
https://github.com/jwinterm/xmr-stak.git
synced 2026-11-04 07:33:54 +01:00
fix bugs
- add excecutor to the singleton export list
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
class printer;
|
||||
class jconf;
|
||||
class executor;
|
||||
|
||||
namespace xmrstak
|
||||
{
|
||||
@@ -22,6 +23,7 @@ struct Environment
|
||||
this->pPrinter = env.pPrinter;
|
||||
this->pGlobalStates = env.pGlobalStates;
|
||||
this->pJconfConfig = env.pJconfConfig;
|
||||
this->pExecutor = env.pExecutor;
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -37,6 +39,8 @@ struct Environment
|
||||
|
||||
jconf* pJconfConfig;
|
||||
|
||||
executor* pExecutor;
|
||||
|
||||
};
|
||||
|
||||
} // namepsace xmrstak
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
|
||||
#include "Plugin.hpp"
|
||||
#include "../Environment.hpp"
|
||||
#include "../console.h"
|
||||
|
||||
namespace xmrstak
|
||||
{
|
||||
|
||||
+1
-1
@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
printer::inst()->print_str("-------------------------------------------------------------------\n");
|
||||
printer::inst()->print_str( XMR_STAK_NAME" " XMR_STAK_VERSION " mining software, CPU Version.\n");
|
||||
printer::inst()->print_str( XMR_STAK_NAME" " XMR_STAK_VERSION " mining software.\n");
|
||||
printer::inst()->print_str("Based on CPU mining code by wolf9466 (heavily optimized by fireice_uk).\n");
|
||||
#ifndef CONF_NO_CUDA
|
||||
printer::inst()->print_str("NVIDIA mining code was written by KlausT and psychocrypt.\n");
|
||||
|
||||
@@ -44,8 +44,6 @@
|
||||
#define strncasecmp _strnicmp
|
||||
#endif // _WIN32
|
||||
|
||||
executor* executor::oInst = NULL;
|
||||
|
||||
executor::executor()
|
||||
{
|
||||
}
|
||||
|
||||
+5
-3
@@ -7,6 +7,7 @@
|
||||
#include <future>
|
||||
#include "telemetry.h"
|
||||
#include "backend/IBackend.hpp"
|
||||
#include "Environment.hpp"
|
||||
|
||||
class jpsock;
|
||||
|
||||
@@ -25,8 +26,10 @@ class executor
|
||||
public:
|
||||
static executor* inst()
|
||||
{
|
||||
if (oInst == nullptr) oInst = new executor;
|
||||
return oInst;
|
||||
auto& env = xmrstak::Environment::inst();
|
||||
if(env.pExecutor == nullptr)
|
||||
env.pExecutor = new executor;
|
||||
return env.pExecutor;
|
||||
};
|
||||
|
||||
void ex_start(bool daemon) { daemon ? ex_main() : std::thread(&executor::ex_main, this).detach(); }
|
||||
@@ -73,7 +76,6 @@ private:
|
||||
bool is_dev_time;
|
||||
|
||||
executor();
|
||||
static executor* oInst;
|
||||
|
||||
void ex_main();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user