91ccd16b33
This makes the initialization sequence much cleaner and conceptually well encapsulated. We also now dynamically allocate the Mind objects. They're allocated dynamically by Mrntt inside of initializeReq. This means that we no longer have to worry about jolting and cleaning up the running threads of global mind object even when we never explicitly called Mind.initializeReq. Along with other conceptual improvements to our abstractions, this patch also gets us to a real "end of program initialization" point for the first time.
38 lines
635 B
C++
38 lines
635 B
C++
#ifndef _MARIONETTE_H
|
|
#define _MARIONETTE_H
|
|
|
|
#include <cstdint>
|
|
#include <atomic>
|
|
#include <memory>
|
|
#include <componentThread.h>
|
|
#include <component.h>
|
|
|
|
namespace smo {
|
|
|
|
class MarionetteThread;
|
|
|
|
namespace mrntt {
|
|
|
|
extern std::atomic<int> exitCode;
|
|
void exitMarionetteLoop();
|
|
extern mrntt::MarionetteComponent mrntt;
|
|
|
|
} // namespace mrntt
|
|
|
|
struct CrtCommandLineArgs
|
|
{
|
|
CrtCommandLineArgs(int argc, char *argv[], char *envp[])
|
|
: argc(argc), argv(argv), envp(envp)
|
|
{}
|
|
|
|
int argc;
|
|
char **argv;
|
|
char **envp;
|
|
|
|
static void set(int argc, char *argv[], char *envp[]);
|
|
};
|
|
|
|
} // namespace smo
|
|
|
|
#endif // _MARIONETTE_H
|