mirror of
https://github.com/latentPrion/libspinscale.git
synced 2026-02-27 14:36:04 +00:00
Rename mrntt=>pptr
We'll probably use the name "marionette" as an application-level name.
This commit is contained in:
@@ -34,9 +34,9 @@ public:
|
||||
{ break; }
|
||||
|
||||
/** EXPLANATION:
|
||||
* In the mrntt and mind thread loops we call checkException() after
|
||||
* run() returns, but we don't have to do that here because
|
||||
* setException() calls stop.
|
||||
* In the puppeteer and mind thread loops we call checkException()
|
||||
* after run() returns, but we don't have to do that here because
|
||||
* setException() calls stop().
|
||||
*
|
||||
* So if an exception is set on our thread, we'll break out of this
|
||||
* loop due to the check for stopped() above, and that'll take us
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
namespace sscl {
|
||||
|
||||
class MarionetteThread;
|
||||
class PuppeteerThread;
|
||||
class PuppetThread;
|
||||
|
||||
// ThreadId is a generic type - application-specific enums should be defined elsewhere
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
|
||||
static const std::shared_ptr<ComponentThread> getSelf(void);
|
||||
static bool tlsInitialized(void);
|
||||
static std::shared_ptr<MarionetteThread> getMrntt();
|
||||
static std::shared_ptr<PuppeteerThread> getMrntt();
|
||||
|
||||
typedef void (mainFn)(ComponentThread &self);
|
||||
|
||||
@@ -66,18 +66,18 @@ public:
|
||||
std::atomic<bool> keepLooping;
|
||||
};
|
||||
|
||||
class MarionetteThread
|
||||
: public std::enable_shared_from_this<MarionetteThread>,
|
||||
class PuppeteerThread
|
||||
: public std::enable_shared_from_this<PuppeteerThread>,
|
||||
public ComponentThread
|
||||
{
|
||||
public:
|
||||
MarionetteThread(ThreadId id = 0)
|
||||
PuppeteerThread(ThreadId id = 0)
|
||||
: ComponentThread(id),
|
||||
thread(main, std::ref(*this))
|
||||
{
|
||||
}
|
||||
|
||||
static void main(MarionetteThread& self);
|
||||
static void main(PuppeteerThread& self);
|
||||
void initializeTls(void);
|
||||
|
||||
public:
|
||||
@@ -154,14 +154,15 @@ public:
|
||||
class ThreadLifetimeMgmtOp;
|
||||
};
|
||||
|
||||
namespace mrntt {
|
||||
extern std::shared_ptr<MarionetteThread> thread;
|
||||
namespace pptr {
|
||||
extern std::shared_ptr<PuppeteerThread> thread;
|
||||
|
||||
// Forward declaration for marionette thread ID management
|
||||
// Forward declaration for puppeteer thread ID management
|
||||
// Must be after sscl namespace so ThreadId is defined
|
||||
extern ThreadId marionetteThreadId;
|
||||
void setMarionetteThreadId(ThreadId id);
|
||||
} // namespace mrntt
|
||||
}
|
||||
extern ThreadId puppeteerThreadId;
|
||||
void setPuppeteerThreadId(ThreadId id);
|
||||
} // namespace pptr
|
||||
|
||||
} // namespace sscl
|
||||
|
||||
#endif // COMPONENT_THREAD_H
|
||||
|
||||
@@ -8,9 +8,10 @@
|
||||
|
||||
namespace sscl {
|
||||
|
||||
class MarionetteThread;
|
||||
class PuppeteerThread;
|
||||
extern std::shared_ptr<sscl::PuppeteerThread> thread;
|
||||
|
||||
namespace mrntt {
|
||||
namespace pptr {
|
||||
|
||||
class MarionetteComponent
|
||||
: public sscl::Component
|
||||
@@ -31,14 +32,12 @@ private:
|
||||
class TerminationEvent;
|
||||
};
|
||||
|
||||
extern std::shared_ptr<sscl::MarionetteThread> thread;
|
||||
|
||||
extern std::atomic<int> exitCode;
|
||||
void exitMarionetteLoop();
|
||||
void marionetteFinalizeReqCb(bool success);
|
||||
extern MarionetteComponent mrntt;
|
||||
|
||||
} // namespace mrntt
|
||||
} // namespace pptr
|
||||
|
||||
struct CrtCommandLineArgs
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user