Libspinscale: Add separate CMake project config

This commit is contained in:
2025-12-28 03:44:01 -04:00
parent 7acdfcc337
commit 5a4f498663
21 changed files with 328 additions and 100 deletions
+8 -8
View File
@@ -1,31 +1,31 @@
#include <iostream>
#include <pthread.h>
#include <componentThread.h>
#include <marionette/marionette.h>
#include <spinscale/componentThread.h>
#include <spinscale/marionette.h>
int main(int argc, char *argv[], char *envp[])
{
// Set the marionette thread ID before using any ComponentThread functionality
sscl::setMarionetteThreadId(smo::SmoThreadId::MRNTT);
sscl::mrntt::setMarionetteThreadId(smo::SmoThreadId::MRNTT);
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';
smo::mrntt::thread->getIoService().post(
sscl::mrntt::thread->getIoService().post(
[argc, argv, envp]()
{
std::cout << "Mrntt:" << __func__ << ":JOLTED: setting cmdline args"
<< '\n';
smo::CrtCommandLineArgs::set(argc, argv, envp);
smo::mrntt::thread->getIoService().stop();
sscl::CrtCommandLineArgs::set(argc, argv, envp);
sscl::mrntt::thread->getIoService().stop();
}
);
smo::mrntt::thread->thread.join();
sscl::mrntt::thread->thread.join();
std::cout << "CRT:" << __func__ << ": Mrntt exited with code '"
<< smo::mrntt::exitCode << "'\n";
return smo::mrntt::exitCode;
<< sscl::mrntt::exitCode << "'\n";
return sscl::mrntt::exitCode;
}