Split: Split libspinscale off from SMO.

Now we can probably begin using libspinscale in Couresilient
without worrying about excessive technical debt later on.
This commit is contained in:
2026-02-22 17:46:27 -04:00
parent 9361a43e40
commit 1c397dfeb5
22 changed files with 350 additions and 310 deletions
+10 -6
View File
@@ -2,29 +2,33 @@
#include <pthread.h>
#include <componentThread.h>
#include <spinscale/componentThread.h>
#include <spinscale/marionette.h>
#include <spinscale/runtime.h>
#include <marionette/marionette.h>
int main(int argc, char *argv[], char *envp[])
{
// Set the pptr thread ID before using any ComponentThread functionality
sscl::pptr::setPuppeteerThreadId(smo::SmoThreadId::MRNTT);
/* Set the pptr thread ID and thread before using any ComponentThread
* functionality.
*/
sscl::ComponentThread::setPuppeteerThreadId(smo::SmoThreadId::MRNTT);
sscl::ComponentThread::setPuppeteerThread(smo::mrntt::thread);
pthread_setname_np(pthread_self(), "smo:CRT:main");
/* We don't do anything inside of main()
* Main merely waits for the marionette thread to exit.
*/
std::cout << "CRT:" << __func__ << ": about to JOLT Mrntt with cmdline args"
<< '\n';
sscl::pptr::thread->getIoService().post(
smo::mrntt::thread->getIoService().post(
[argc, argv, envp]()
{
std::cout << "Mrntt:" << __func__ << ":JOLTED: setting cmdline args"
<< '\n';
sscl::CrtCommandLineArgs::set(argc, argv, envp);
sscl::pptr::thread->getIoService().stop();
smo::mrntt::thread->getIoService().stop();
}
);
sscl::pptr::thread->thread.join();
smo::mrntt::thread->thread.join();
std::cout << "CRT:" << __func__ << ": Mrntt exited with code '"
<< sscl::pptr::exitCode << "'\n";
return sscl::pptr::exitCode;