Skip to content
Snippets Groups Projects
Commit 9e7efd40 authored by psychocrypt's avatar psychocrypt
Browse files

fix bugs

- add excecutor to the singleton export list
parent b1e92092
No related branches found
No related tags found
No related merge requests found
......@@ -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
{
......
......@@ -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()
{
}
......
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment