Spinscale: create new namespace sscl

This commit is contained in:
2025-12-27 16:21:22 -04:00
parent 0c4f427c0a
commit 34d76df7d9
67 changed files with 434 additions and 429 deletions
@@ -5,7 +5,7 @@
#include <atomic>
#include <boost/asio/io_service.hpp>
namespace smo {
namespace sscl {
class AsynchronousBridge
{
@@ -53,6 +53,6 @@ private:
boost::asio::io_service &io_service;
};
} // namespace smo
} // namespace sscl
#endif // ASYNCHRONOUS_BRIDGE_H
@@ -10,7 +10,7 @@
#include <spinscale/asynchronousContinuationChainLink.h>
namespace smo {
namespace sscl {
/**
* AsynchronousContinuation - Template base class for async sequence management
@@ -153,6 +153,6 @@ public:
std::shared_ptr<ComponentThread> caller;
};
} // namespace smo
} // namespace sscl
#endif // ASYNCHRONOUS_CONTINUATION_H
@@ -3,7 +3,7 @@
#include <memory>
namespace smo {
namespace sscl {
/**
* @brief Base class for all asynchronous continuation chain links
@@ -27,6 +27,6 @@ public:
getCallersContinuationShPtr() const = 0;
};
} // namespace smo
} // namespace sscl
#endif // ASYNCHRONOUS_CONTINUATION_CHAIN_LINK_H
@@ -3,7 +3,7 @@
#include <atomic>
namespace smo {
namespace sscl {
class AsynchronousLoop
{
@@ -64,6 +64,6 @@ public:
std::atomic<unsigned int> nSucceeded, nFailed;
};
} // namespace smo
} // namespace sscl
#endif // ASYNCHRONOUS_LOOP_H
@@ -13,7 +13,7 @@
// The code will check for OPTS_H define to see if opts.h has been included
class OptionParser;
namespace smo {
namespace sscl {
/**
* @brief CallableTracer - Wraps callables with metadata for debugging
@@ -85,7 +85,7 @@ private:
std::function<void()> callable;
};
} // namespace smo
} // namespace sscl
/**
* @brief STC - SMO Traceable Callable macro
+2 -2
View File
@@ -3,7 +3,7 @@
#include <memory>
namespace smo {
namespace sscl {
// Forward declaration
class AsynchronousContinuationChainLink;
@@ -26,6 +26,6 @@ public:
CbFnT callbackFn;
};
} // namespace smo
} // namespace sscl
#endif // SPINSCALE_CALLBACK_H
+2 -2
View File
@@ -7,7 +7,7 @@
#include <spinscale/callback.h>
#include <spinscale/puppetApplication.h>
namespace smo {
namespace sscl {
class ComponentThread;
@@ -36,6 +36,6 @@ public:
PuppetApplication &parent;
};
} // namespace smo
} // namespace sscl
#endif // COMPONENT_H
@@ -17,7 +17,7 @@
#include <cstdint>
#include <string>
namespace smo {
namespace sscl {
class MarionetteThread;
class PuppetThread;
@@ -148,17 +148,19 @@ public:
class ThreadLifetimeMgmtOp;
};
namespace mrntt {
extern std::shared_ptr<MarionetteThread> thread;
} // namespace mrntt
} // namespace sscl
namespace smo {
namespace mrntt {
extern std::shared_ptr<sscl::MarionetteThread> thread;
} // namespace mrntt
} // namespace smo
// Forward declaration for spinscale namespace functions and variables
// Must be after smo namespace so ThreadId is defined
namespace spinscale {
extern smo::ThreadId marionetteThreadId;
void setMarionetteThreadId(smo::ThreadId id);
// Forward declaration for sscl namespace functions and variables
// Must be after sscl namespace so ThreadId is defined
namespace sscl {
extern sscl::ThreadId marionetteThreadId;
void setMarionetteThreadId(sscl::ThreadId id);
}
#endif // COMPONENT_THREAD_H
@@ -6,7 +6,7 @@
#include <vector>
#include <memory>
namespace smo {
namespace sscl {
// Forward declarations
class AsynchronousContinuationChainLink;
@@ -80,6 +80,6 @@ private:
AdjacencyList adjacencyList;
};
} // namespace smo
} // namespace sscl
#endif // DEPENDENCY_GRAPH_H
+2 -2
View File
@@ -9,7 +9,7 @@
#include <spinscale/qutex.h>
#include <spinscale/lockerAndInvokerBase.h>
namespace smo {
namespace sscl {
// Forward declarations
template <class OriginalCbFnT>
@@ -255,6 +255,6 @@ private:
bool allLocksAcquired, registeredInQutexQueues;
};
} // namespace smo
} // namespace sscl
#endif // LOCK_SET_H
@@ -4,7 +4,7 @@
#include <list>
#include <memory>
namespace smo {
namespace sscl {
// Forward declaration
class Qutex;
@@ -82,6 +82,6 @@ protected:
const void* serializedContinuationVaddr;
};
} // namespace smo
} // namespace sscl
#endif // LOCKER_AND_INVOKER_BASE_H
@@ -8,7 +8,7 @@
#include <spinscale/callback.h>
#include <spinscale/componentThread.h>
namespace smo {
namespace sscl {
class PuppetApplication
: public std::enable_shared_from_this<PuppetApplication>
@@ -63,6 +63,6 @@ private:
class PuppetThreadLifetimeMgmtOp;
};
} // namespace smo
} // namespace sscl
#endif // PUPPET_APPLICATION_H
+2 -2
View File
@@ -8,7 +8,7 @@
#include <spinscale/spinLock.h>
#include <spinscale/lockerAndInvokerBase.h>
namespace smo {
namespace sscl {
/**
* @brief Qutex - Queue-based mutex for asynchronous lock management
@@ -102,6 +102,6 @@ public:
bool isOwned;
};
} // namespace smo
} // namespace sscl
#endif // QUTEX_H
@@ -8,7 +8,7 @@
#include "spinLock.h"
namespace smo {
namespace sscl {
// Forward declarations
class Qutex;
@@ -159,6 +159,6 @@ private:
AcquisitionHistoryMap acquisitionHistory;
};
} // namespace smo
} // namespace sscl
#endif // QUTEX_ACQUISITION_HISTORY_TRACKER_H
@@ -14,7 +14,7 @@
#include <spinscale/callback.h>
#include <spinscale/qutexAcquisitionHistoryTracker.h>
namespace smo {
namespace sscl {
template <class OriginalCbFnT>
class SerializedAsynchronousContinuation
@@ -583,6 +583,6 @@ void SerializedAsynchronousContinuation<OriginalCbFnT>
invocationTarget();
}
} // namespace smo
} // namespace sscl
#endif // SERIALIZED_ASYNCHRONOUS_CONTINUATION_H
+2 -2
View File
@@ -14,7 +14,7 @@
#include <arm_neon.h>
#endif
namespace smo {
namespace sscl {
/**
* @brief Simple spinlock using std::atomic
@@ -116,6 +116,6 @@ private:
std::atomic<bool> locked;
};
} // namespace smo
} // namespace sscl
#endif // SPIN_LOCK_H