mirror of
https://github.com/latentPrion/libspinscale.git
synced 2026-06-23 19:48:32 +00:00
Update include paths and namespacing
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include <spinscale/callableTracer.h>
|
||||
#include <spinscale/cps/callableTracer.h>
|
||||
|
||||
namespace sscl {
|
||||
namespace sscl::cps {
|
||||
|
||||
bool CallableTracer::optTraceCallables = false;
|
||||
|
||||
} // namespace sscl
|
||||
} // namespace sscl::cps
|
||||
|
||||
+11
-11
@@ -5,9 +5,9 @@
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
||||
#include <boost/asio/io_service.hpp>
|
||||
#include <spinscale/asynchronousContinuation.h>
|
||||
#include <spinscale/callback.h>
|
||||
#include <spinscale/callableTracer.h>
|
||||
#include <spinscale/cps/asynchronousContinuation.h>
|
||||
#include <spinscale/cps/callback.h>
|
||||
#include <spinscale/cps/callableTracer.h>
|
||||
#include <spinscale/component.h>
|
||||
#include <spinscale/componentThread.h>
|
||||
|
||||
@@ -79,14 +79,14 @@ const std::shared_ptr<ComponentThread> ComponentThread::getSelf(void)
|
||||
}
|
||||
|
||||
class PuppetThread::ThreadLifetimeMgmtOp
|
||||
: public PostedAsynchronousContinuation<threadLifetimeMgmtOpCbFn>
|
||||
: public cps::PostedAsynchronousContinuation<threadLifetimeMgmtOpCbFn>
|
||||
{
|
||||
public:
|
||||
ThreadLifetimeMgmtOp(
|
||||
const std::shared_ptr<ComponentThread> &caller,
|
||||
const std::shared_ptr<PuppetThread> &target,
|
||||
Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
: PostedAsynchronousContinuation<threadLifetimeMgmtOpCbFn>(
|
||||
cps::Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
: cps::PostedAsynchronousContinuation<threadLifetimeMgmtOpCbFn>(
|
||||
caller, callback),
|
||||
target(target)
|
||||
{}
|
||||
@@ -181,7 +181,7 @@ void ComponentThread::cleanup(void)
|
||||
|
||||
void PuppetThread::joltThreadReq(
|
||||
const std::shared_ptr<PuppetThread>& selfPtr,
|
||||
Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
cps::Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
{
|
||||
/** EXPLANATION:
|
||||
* We can't use shared_from_this() here because JOLTing occurs prior to
|
||||
@@ -216,7 +216,7 @@ void PuppetThread::joltThreadReq(
|
||||
}
|
||||
|
||||
// Thread management method implementations
|
||||
void PuppetThread::startThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
void PuppetThread::startThreadReq(cps::Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
{
|
||||
std::shared_ptr<ComponentThread> caller = getSelf();
|
||||
auto request = std::make_shared<ThreadLifetimeMgmtOp>(
|
||||
@@ -229,7 +229,7 @@ void PuppetThread::startThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
request.get(), request)));
|
||||
}
|
||||
|
||||
void PuppetThread::exitThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
void PuppetThread::exitThreadReq(cps::Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
{
|
||||
std::shared_ptr<ComponentThread> caller = getSelf();
|
||||
auto request = std::make_shared<ThreadLifetimeMgmtOp>(
|
||||
@@ -247,7 +247,7 @@ void PuppetThread::exitThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
request.get(), request)));
|
||||
}
|
||||
|
||||
void PuppetThread::pauseThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
void PuppetThread::pauseThreadReq(cps::Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
{
|
||||
if (id == sscl::pptr::puppeteerThreadId)
|
||||
{
|
||||
@@ -266,7 +266,7 @@ void PuppetThread::pauseThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
request.get(), request)));
|
||||
}
|
||||
|
||||
void PuppetThread::resumeThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
void PuppetThread::resumeThreadReq(cps::Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
{
|
||||
if (id == sscl::pptr::puppeteerThreadId)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <spinscale/lockerAndInvokerBase.h>
|
||||
#include <spinscale/cps/lockerAndInvokerBase.h>
|
||||
|
||||
namespace sscl {
|
||||
namespace sscl::cps {
|
||||
|
||||
} // namespace sscl
|
||||
} // namespace sscl::cps
|
||||
|
||||
+10
-10
@@ -1,7 +1,7 @@
|
||||
#include <iostream>
|
||||
#include <spinscale/asynchronousContinuation.h>
|
||||
#include <spinscale/cps/asynchronousContinuation.h>
|
||||
#include <spinscale/asynchronousLoop.h>
|
||||
#include <spinscale/callback.h>
|
||||
#include <spinscale/cps/callback.h>
|
||||
#include <spinscale/puppetApplication.h>
|
||||
#include <spinscale/componentThread.h>
|
||||
|
||||
@@ -14,13 +14,13 @@ PuppetApplication::PuppetApplication(
|
||||
}
|
||||
|
||||
class PuppetApplication::PuppetThreadLifetimeMgmtOp
|
||||
: public NonPostedAsynchronousContinuation<puppetThreadLifetimeMgmtOpCbFn>
|
||||
: public cps::NonPostedAsynchronousContinuation<puppetThreadLifetimeMgmtOpCbFn>
|
||||
{
|
||||
public:
|
||||
PuppetThreadLifetimeMgmtOp(
|
||||
PuppetApplication &parent, unsigned int nThreads,
|
||||
Callback<puppetThreadLifetimeMgmtOpCbFn> callback)
|
||||
: NonPostedAsynchronousContinuation<puppetThreadLifetimeMgmtOpCbFn>(callback),
|
||||
cps::Callback<puppetThreadLifetimeMgmtOpCbFn> callback)
|
||||
: cps::NonPostedAsynchronousContinuation<puppetThreadLifetimeMgmtOpCbFn>(callback),
|
||||
loop(nThreads),
|
||||
parent(parent)
|
||||
{}
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
};
|
||||
|
||||
void PuppetApplication::joltAllPuppetThreadsReq(
|
||||
Callback<puppetThreadLifetimeMgmtOpCbFn> callback
|
||||
cps::Callback<puppetThreadLifetimeMgmtOpCbFn> callback
|
||||
)
|
||||
{
|
||||
if (threadsHaveBeenJolted)
|
||||
@@ -107,7 +107,7 @@ void PuppetApplication::joltAllPuppetThreadsReq(
|
||||
}
|
||||
|
||||
void PuppetApplication::startAllPuppetThreadsReq(
|
||||
Callback<puppetThreadLifetimeMgmtOpCbFn> callback
|
||||
cps::Callback<puppetThreadLifetimeMgmtOpCbFn> callback
|
||||
)
|
||||
{
|
||||
// If no threads, call callback immediately
|
||||
@@ -131,7 +131,7 @@ void PuppetApplication::startAllPuppetThreadsReq(
|
||||
}
|
||||
|
||||
void PuppetApplication::pauseAllPuppetThreadsReq(
|
||||
Callback<puppetThreadLifetimeMgmtOpCbFn> callback
|
||||
cps::Callback<puppetThreadLifetimeMgmtOpCbFn> callback
|
||||
)
|
||||
{
|
||||
// If no threads, call callback immediately
|
||||
@@ -155,7 +155,7 @@ void PuppetApplication::pauseAllPuppetThreadsReq(
|
||||
}
|
||||
|
||||
void PuppetApplication::resumeAllPuppetThreadsReq(
|
||||
Callback<puppetThreadLifetimeMgmtOpCbFn> callback
|
||||
cps::Callback<puppetThreadLifetimeMgmtOpCbFn> callback
|
||||
)
|
||||
{
|
||||
// If no threads, call callback immediately
|
||||
@@ -179,7 +179,7 @@ void PuppetApplication::resumeAllPuppetThreadsReq(
|
||||
}
|
||||
|
||||
void PuppetApplication::exitAllPuppetThreadsReq(
|
||||
Callback<puppetThreadLifetimeMgmtOpCbFn> callback
|
||||
cps::Callback<puppetThreadLifetimeMgmtOpCbFn> callback
|
||||
)
|
||||
{
|
||||
// If no threads, call callback immediately
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
#include <spinscale/qutex.h>
|
||||
#include <spinscale/lockerAndInvokerBase.h>
|
||||
#include <spinscale/cps/qutex.h>
|
||||
#include <spinscale/cps/lockerAndInvokerBase.h>
|
||||
|
||||
namespace sscl {
|
||||
namespace sscl::cps {
|
||||
|
||||
bool Qutex::tryAcquire(
|
||||
const LockerAndInvokerBase &tryingLockvoker, int nRequiredLocks
|
||||
@@ -377,4 +377,4 @@ void Qutex::release()
|
||||
front->awaken();
|
||||
}
|
||||
|
||||
} // namespace sscl
|
||||
} // namespace sscl::cps
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#include <spinscale/qutexAcquisitionHistoryTracker.h>
|
||||
#include <spinscale/serializedAsynchronousContinuation.h>
|
||||
#include <spinscale/qutex.h>
|
||||
#include <spinscale/dependencyGraph.h>
|
||||
#include <spinscale/cps/qutexAcquisitionHistoryTracker.h>
|
||||
#include <spinscale/cps/serializedAsynchronousContinuation.h>
|
||||
#include <spinscale/cps/qutex.h>
|
||||
#include <spinscale/cps/dependencyGraph.h>
|
||||
#include <memory>
|
||||
#include <forward_list>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
|
||||
namespace sscl {
|
||||
namespace sscl::cps {
|
||||
|
||||
void DependencyGraph::addNode(const Node& node)
|
||||
{
|
||||
@@ -390,4 +390,4 @@ bool QutexAcquisitionHistoryTracker
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace sscl
|
||||
} // namespace sscl::cps
|
||||
|
||||
Reference in New Issue
Block a user