Spinscale: create new namespace sscl
This commit is contained in:
+17
-17
@@ -14,8 +14,8 @@
|
||||
namespace smo {
|
||||
|
||||
Mind::Mind(void)
|
||||
: PuppetApplication(
|
||||
std::vector<std::shared_ptr<PuppetThread>>{
|
||||
: sscl::PuppetApplication(
|
||||
std::vector<std::shared_ptr<sscl::PuppetThread>>{
|
||||
std::make_shared<MindThread>(SmoThreadId::DIRECTOR, *this),
|
||||
std::make_shared<MindThread>(SmoThreadId::SIMULATOR, *this),
|
||||
std::make_shared<MindThread>(SmoThreadId::SUBCONSCIOUS, *this),
|
||||
@@ -24,22 +24,22 @@ Mind::Mind(void)
|
||||
, std::make_shared<MindThread>(SmoThreadId::WORLD, *this)
|
||||
#endif
|
||||
}),
|
||||
director(*this, std::static_pointer_cast<MindThread>(componentThreads[0])),
|
||||
canvas(*this, std::static_pointer_cast<MindThread>(componentThreads[1])),
|
||||
subconscious(*this, std::static_pointer_cast<MindThread>(componentThreads[2])),
|
||||
body(*this, std::static_pointer_cast<MindThread>(componentThreads[3])),
|
||||
director(*this, std::static_pointer_cast<sscl::ComponentThread>(componentThreads[0])),
|
||||
canvas(*this, std::static_pointer_cast<sscl::ComponentThread>(componentThreads[1])),
|
||||
subconscious(*this, std::static_pointer_cast<sscl::ComponentThread>(componentThreads[2])),
|
||||
body(*this, std::static_pointer_cast<sscl::ComponentThread>(componentThreads[3])),
|
||||
world(*this,
|
||||
#ifndef CONFIG_WORLD_USE_BODY_THREAD
|
||||
std::static_pointer_cast<MindThread>(componentThreads[4])
|
||||
std::static_pointer_cast<sscl::ComponentThread>(componentThreads[4])
|
||||
#else
|
||||
std::static_pointer_cast<MindThread>(componentThreads[3])
|
||||
std::static_pointer_cast<sscl::ComponentThread>(componentThreads[3])
|
||||
#endif
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<MindThread>
|
||||
Mind::getComponentThread(ThreadId id) const
|
||||
Mind::getComponentThread(sscl::ThreadId id) const
|
||||
{
|
||||
if (id == SmoThreadId::MRNTT)
|
||||
{
|
||||
@@ -98,13 +98,13 @@ Mind::getMindThreads() const
|
||||
}
|
||||
|
||||
class Mind::MindLifetimeMgmtOp
|
||||
: public PostedAsynchronousContinuation<mindLifetimeMgmtOpCbFn>
|
||||
: public sscl::PostedAsynchronousContinuation<mindLifetimeMgmtOpCbFn>
|
||||
{
|
||||
public:
|
||||
MindLifetimeMgmtOp(
|
||||
Mind &parent, const std::shared_ptr<ComponentThread> &caller,
|
||||
Callback<mindLifetimeMgmtOpCbFn> callback)
|
||||
: PostedAsynchronousContinuation<mindLifetimeMgmtOpCbFn>(
|
||||
Mind &parent, const std::shared_ptr<sscl::ComponentThread> &caller,
|
||||
sscl::Callback<mindLifetimeMgmtOpCbFn> callback)
|
||||
: sscl::PostedAsynchronousContinuation<mindLifetimeMgmtOpCbFn>(
|
||||
caller, callback),
|
||||
parent(parent)
|
||||
{}
|
||||
@@ -209,7 +209,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
void Mind::initializeReq(Callback<mindLifetimeMgmtOpCbFn> callback)
|
||||
void Mind::initializeReq(sscl::Callback<mindLifetimeMgmtOpCbFn> callback)
|
||||
{
|
||||
/* Distribute threads across available CPUs */
|
||||
try
|
||||
@@ -223,7 +223,7 @@ void Mind::initializeReq(Callback<mindLifetimeMgmtOpCbFn> callback)
|
||||
"Error: " << e.what() << "\n";
|
||||
}
|
||||
|
||||
const auto& caller = ComponentThread::getSelf();
|
||||
const auto& caller = sscl::ComponentThread::getSelf();
|
||||
auto request = std::make_shared<MindLifetimeMgmtOp>(
|
||||
*this, caller, callback);
|
||||
|
||||
@@ -233,9 +233,9 @@ void Mind::initializeReq(Callback<mindLifetimeMgmtOpCbFn> callback)
|
||||
request.get(), request)));
|
||||
}
|
||||
|
||||
void Mind::finalizeReq(Callback<mindLifetimeMgmtOpCbFn> callback)
|
||||
void Mind::finalizeReq(sscl::Callback<mindLifetimeMgmtOpCbFn> callback)
|
||||
{
|
||||
const auto& caller = ComponentThread::getSelf();
|
||||
const auto& caller = sscl::ComponentThread::getSelf();
|
||||
auto request = std::make_shared<MindLifetimeMgmtOp>(
|
||||
*this, caller, callback);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user