mirror of
https://github.com/latentPrion/libspinscale.git
synced 2026-02-27 14:36:04 +00:00
CompThread: Rearrange global var defs
This commit is contained in:
@@ -14,27 +14,25 @@
|
|||||||
namespace sscl {
|
namespace sscl {
|
||||||
|
|
||||||
namespace mrntt {
|
namespace mrntt {
|
||||||
// Global variable to store the marionette thread ID
|
/* Global variable to store the marionette thread ID
|
||||||
// Default value is 0, but should be set by application code via setMarionetteThreadId()
|
* Default value is 0, but should be set by application code via
|
||||||
|
* setMarionetteThreadId().
|
||||||
|
*/
|
||||||
ThreadId marionetteThreadId = 0;
|
ThreadId marionetteThreadId = 0;
|
||||||
|
/* Global marionette thread instance - defined here but initialized by
|
||||||
|
* application code.
|
||||||
|
*/
|
||||||
|
std::shared_ptr<MarionetteThread> thread;
|
||||||
|
|
||||||
void setMarionetteThreadId(ThreadId id)
|
void setMarionetteThreadId(ThreadId id)
|
||||||
{
|
{
|
||||||
marionetteThreadId = id;
|
marionetteThreadId = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace mrntt
|
} // namespace mrntt
|
||||||
|
|
||||||
} // namespace sscl
|
|
||||||
|
|
||||||
namespace sscl {
|
|
||||||
|
|
||||||
thread_local std::shared_ptr<ComponentThread> thisComponentThread;
|
thread_local std::shared_ptr<ComponentThread> thisComponentThread;
|
||||||
|
|
||||||
namespace mrntt {
|
|
||||||
// Global marionette thread instance - defined here but initialized by application
|
|
||||||
std::shared_ptr<MarionetteThread> thread;
|
|
||||||
} // namespace mrntt
|
|
||||||
|
|
||||||
// Implementation of static method
|
// Implementation of static method
|
||||||
std::shared_ptr<MarionetteThread> ComponentThread::getMrntt()
|
std::shared_ptr<MarionetteThread> ComponentThread::getMrntt()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user