Update include paths and namespacing

This commit is contained in:
2026-05-17 17:26:21 -04:00
parent 83ad680c68
commit e94aaf9323
20 changed files with 99 additions and 99 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
#include <config.h>
#include <atomic>
#include <memory>
#include <spinscale/callback.h>
#include <spinscale/cps/callback.h>
#include <spinscale/puppetApplication.h>
namespace sscl {
+6 -6
View File
@@ -13,7 +13,7 @@
#include <sched.h>
#include <unistd.h>
#include <memory>
#include <spinscale/callback.h>
#include <spinscale/cps/callback.h>
#include <cstdint>
#include <string>
@@ -162,10 +162,10 @@ public:
// Thread management methods
typedef std::function<void()> threadLifetimeMgmtOpCbFn;
void startThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback);
void exitThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback);
void pauseThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback);
void resumeThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback);
void startThreadReq(cps::Callback<threadLifetimeMgmtOpCbFn> callback);
void exitThreadReq(cps::Callback<threadLifetimeMgmtOpCbFn> callback);
void pauseThreadReq(cps::Callback<threadLifetimeMgmtOpCbFn> callback);
void resumeThreadReq(cps::Callback<threadLifetimeMgmtOpCbFn> callback);
/**
* JOLTs this thread to begin processing after global initialization.
@@ -180,7 +180,7 @@ public:
*/
void joltThreadReq(
const std::shared_ptr<PuppetThread>& selfPtr,
Callback<threadLifetimeMgmtOpCbFn> callback);
cps::Callback<threadLifetimeMgmtOpCbFn> callback);
// CPU management methods
void pinToCpu(int cpuId);
+2 -2
View File
@@ -5,7 +5,7 @@
#include <atomic>
#include <boost/asio/io_service.hpp>
namespace sscl {
namespace sscl::cps {
class AsynchronousBridge
{
@@ -53,6 +53,6 @@ private:
boost::asio::io_service &io_service;
};
} // namespace sscl
} // namespace sscl::cps
#endif // ASYNCHRONOUS_BRIDGE_H
@@ -5,12 +5,12 @@
#include <memory>
#include <exception>
#include <spinscale/componentThread.h>
#include <spinscale/callback.h>
#include <spinscale/callableTracer.h>
#include <spinscale/asynchronousContinuationChainLink.h>
#include <spinscale/cps/callback.h>
#include <spinscale/cps/callableTracer.h>
#include <spinscale/cps/asynchronousContinuationChainLink.h>
namespace sscl {
namespace sscl::cps {
/**
* AsynchronousContinuation - Template base class for async sequence management
@@ -129,7 +129,7 @@ class PostedAsynchronousContinuation
{
public:
PostedAsynchronousContinuation(
const std::shared_ptr<ComponentThread> &caller,
const std::shared_ptr<sscl::ComponentThread> &caller,
Callback<OriginalCbFnT> originalCbFn)
: AsynchronousContinuation<OriginalCbFnT>(originalCbFn),
caller(caller)
@@ -150,9 +150,9 @@ public:
}
public:
std::shared_ptr<ComponentThread> caller;
std::shared_ptr<sscl::ComponentThread> caller;
};
} // namespace sscl
} // namespace sscl::cps
#endif // ASYNCHRONOUS_CONTINUATION_H
@@ -4,10 +4,10 @@
#include <functional>
#include <memory>
#include <optional>
#include <vector>
#include <spinscale/lockSet.h>
namespace sscl {
namespace sscl::cps {
class LockSet;
/**
* @brief Base class for all asynchronous continuation chain links
@@ -38,6 +38,6 @@ public:
{ return std::nullopt; }
};
} // namespace sscl
} // namespace sscl::cps
#endif // ASYNCHRONOUS_CONTINUATION_CHAIN_LINK_H
+7 -7
View File
@@ -8,7 +8,7 @@
#include <cstdint>
#include <spinscale/componentThread.h>
namespace sscl {
namespace sscl::cps {
/**
* @brief CallableTracer - Wraps callables with metadata for debugging
@@ -49,8 +49,8 @@ public:
if (optTraceCallables)
{
std::cout << "" << __func__ << ": On thread "
<< (ComponentThread::tlsInitialized()
? ComponentThread::getSelf()->name : "<TLS un-init'ed>")
<< (sscl::ComponentThread::tlsInitialized()
? sscl::ComponentThread::getSelf()->name : "<TLS un-init'ed>")
<< ": Calling callable posted by:\n"
<< "\t" << callerFuncName << "\n\tat line " << (int)callerLine
<< " return addr 0: " << returnAddr0
@@ -79,7 +79,7 @@ private:
std::function<void()> callable;
};
} // namespace sscl
} // namespace sscl::cps
/**
* @brief STC - SMO Traceable Callable macro
@@ -109,7 +109,7 @@ private:
// e.g., "void smo::SomeClass::method(int, int)"
// __builtin_return_address(0) = direct caller
// __builtin_return_address(1) = caller before that
#define STC(arg) sscl::CallableTracer( \
#define STC(arg) sscl::cps::CallableTracer( \
__PRETTY_FUNCTION__, \
__LINE__, \
__builtin_return_address(0), \
@@ -120,7 +120,7 @@ private:
// e.g., "void __cdecl smo::SomeClass::method(int, int)"
// _ReturnAddress() = direct caller (only one level available)
#include <intrin.h>
#define STC(arg) sscl::CallableTracer( \
#define STC(arg) sscl::cps::CallableTracer( \
__FUNCSIG__, \
__LINE__, \
_ReturnAddress(), \
@@ -129,7 +129,7 @@ private:
#else
// Fallback to standard __func__ (unqualified name only)
// No return address support
#define STC(arg) sscl::CallableTracer( \
#define STC(arg) sscl::cps::CallableTracer( \
__func__, \
__LINE__, \
nullptr, \
+2 -2
View File
@@ -3,7 +3,7 @@
#include <memory>
namespace sscl {
namespace sscl::cps {
// Forward declaration
class AsynchronousContinuationChainLink;
@@ -26,6 +26,6 @@ public:
CbFnT callbackFn;
};
} // namespace sscl
} // namespace sscl::cps
#endif // SPINSCALE_CALLBACK_H
+2 -2
View File
@@ -6,7 +6,7 @@
#include <vector>
#include <memory>
namespace sscl {
namespace sscl::cps {
// Forward declarations
class AsynchronousContinuationChainLink;
@@ -80,6 +80,6 @@ private:
AdjacencyList adjacencyList;
};
} // namespace sscl
} // namespace sscl::cps
#endif // DEPENDENCY_GRAPH_H
+4 -4
View File
@@ -6,10 +6,10 @@
#include <utility>
#include <memory>
#include <optional>
#include <spinscale/qutex.h>
#include <spinscale/lockerAndInvokerBase.h>
#include <spinscale/cps/qutex.h>
#include <spinscale/cps/lockerAndInvokerBase.h>
namespace sscl {
namespace sscl::cps {
class Qutex;
@@ -280,6 +280,6 @@ private:
bool allLocksAcquired, registeredInQutexQueues;
};
} // namespace sscl
} // namespace sscl::cps
#endif // LOCK_SET_H
+2 -2
View File
@@ -4,7 +4,7 @@
#include <list>
#include <memory>
namespace sscl {
namespace sscl::cps {
// Forward declaration
class Qutex;
@@ -82,6 +82,6 @@ protected:
const void* serializedContinuationVaddr;
};
} // namespace sscl
} // namespace sscl::cps
#endif // LOCKER_AND_INVOKER_BASE_H
+4 -4
View File
@@ -6,9 +6,9 @@
#include <memory>
#include <string>
#include <spinscale/spinLock.h>
#include <spinscale/lockerAndInvokerBase.h>
#include <spinscale/cps/lockerAndInvokerBase.h>
namespace sscl {
namespace sscl::cps {
/**
* @brief Qutex - Queue-based mutex for asynchronous lock management
@@ -97,11 +97,11 @@ public:
std::string name;
std::shared_ptr<LockerAndInvokerBase> currOwner;
#endif
SpinLock lock;
sscl::SpinLock lock;
LockerAndInvokerBase::List queue;
bool isOwned;
};
} // namespace sscl
} // namespace sscl::cps
#endif // QUTEX_H
@@ -5,10 +5,10 @@
#include <memory>
#include <forward_list>
#include <functional>
#include "spinLock.h"
#include <spinscale/spinLock.h>
namespace sscl {
namespace sscl::cps {
// Forward declarations
class Qutex;
@@ -155,10 +155,10 @@ private:
* Therefore, it's best to use a SpinLock on the history class to avoid
* these coupling issues.
*/
SpinLock acquisitionHistoryLock;
sscl::SpinLock acquisitionHistoryLock;
AcquisitionHistoryMap acquisitionHistory;
};
} // namespace sscl
} // namespace sscl::cps
#endif // QUTEX_ACQUISITION_HISTORY_TRACKER_H
@@ -8,13 +8,13 @@
#include <iostream>
#include <optional>
#include <spinscale/componentThread.h>
#include <spinscale/lockSet.h>
#include <spinscale/asynchronousContinuation.h>
#include <spinscale/lockerAndInvokerBase.h>
#include <spinscale/callback.h>
#include <spinscale/qutexAcquisitionHistoryTracker.h>
#include <spinscale/cps/lockSet.h>
#include <spinscale/cps/asynchronousContinuation.h>
#include <spinscale/cps/lockerAndInvokerBase.h>
#include <spinscale/cps/callback.h>
#include <spinscale/cps/qutexAcquisitionHistoryTracker.h>
namespace sscl {
namespace sscl::cps {
template <class OriginalCbFnT>
class SerializedAsynchronousContinuation
@@ -22,7 +22,7 @@ class SerializedAsynchronousContinuation
{
public:
SerializedAsynchronousContinuation(
const std::shared_ptr<ComponentThread> &caller,
const std::shared_ptr<sscl::ComponentThread> &caller,
Callback<OriginalCbFnT> originalCbFn,
std::vector<std::reference_wrapper<Qutex>> requiredLocks)
: PostedAsynchronousContinuation<OriginalCbFnT>(caller, originalCbFn),
@@ -83,7 +83,7 @@ public:
LockerAndInvoker(
SerializedAsynchronousContinuation<OriginalCbFnT>
&serializedContinuation,
const std::shared_ptr<ComponentThread>& target,
const std::shared_ptr<sscl::ComponentThread>& target,
InvocationTargetT invocationTarget)
: LockerAndInvokerBase(&serializedContinuation),
#ifdef CONFIG_ENABLE_DEBUG_LOCKS
@@ -266,7 +266,7 @@ public:
#endif
SerializedAsynchronousContinuation<OriginalCbFnT>
&serializedContinuation;
std::shared_ptr<ComponentThread> target;
std::shared_ptr<sscl::ComponentThread> target;
InvocationTargetT invocationTarget;
};
};
@@ -470,7 +470,7 @@ template <class InvocationTargetT>
void SerializedAsynchronousContinuation<OriginalCbFnT>
::LockerAndInvoker<InvocationTargetT>::operator()()
{
if (ComponentThread::getSelf() != target)
if (sscl::ComponentThread::getSelf() != target)
{
throw std::runtime_error(
"LockerAndInvoker::operator(): Thread safety violation - "
@@ -588,6 +588,6 @@ void SerializedAsynchronousContinuation<OriginalCbFnT>
invocationTarget();
}
} // namespace sscl
} // namespace sscl::cps
#endif // SERIALIZED_ASYNCHRONOUS_CONTINUATION_H
+6 -6
View File
@@ -5,7 +5,7 @@
#include <functional>
#include <memory>
#include <vector>
#include <spinscale/callback.h>
#include <spinscale/cps/callback.h>
#include <spinscale/componentThread.h>
namespace sscl {
@@ -21,15 +21,15 @@ public:
// Thread management methods
typedef std::function<void()> puppetThreadLifetimeMgmtOpCbFn;
void joltAllPuppetThreadsReq(
Callback<puppetThreadLifetimeMgmtOpCbFn> callback);
cps::Callback<puppetThreadLifetimeMgmtOpCbFn> callback);
void startAllPuppetThreadsReq(
Callback<puppetThreadLifetimeMgmtOpCbFn> callback);
cps::Callback<puppetThreadLifetimeMgmtOpCbFn> callback);
void pauseAllPuppetThreadsReq(
Callback<puppetThreadLifetimeMgmtOpCbFn> callback);
cps::Callback<puppetThreadLifetimeMgmtOpCbFn> callback);
void resumeAllPuppetThreadsReq(
Callback<puppetThreadLifetimeMgmtOpCbFn> callback);
cps::Callback<puppetThreadLifetimeMgmtOpCbFn> callback);
void exitAllPuppetThreadsReq(
Callback<puppetThreadLifetimeMgmtOpCbFn> callback);
cps::Callback<puppetThreadLifetimeMgmtOpCbFn> callback);
// CPU distribution method
void distributeAndPinThreadsAcrossCpus();