Commit Graph

236 Commits

Author SHA1 Message Date
hayodea 49c8b5bca1 SenseApiMgr: Print dev info when detaching, use early return pattern 2025-07-30 10:33:50 -04:00
hayodea a2598e80fd Mrntt: Call mind.finalize() on mind object. 2025-07-30 10:14:18 -04:00
hayodea 4fde28dad8 Mrntt: Call shutdownSalmanoff after exiting main loop
We moved initializeSalmanoff and shutdownSalmanoff into
salmanoff.cpp. Now we also invoke shutdownSalmanoff when exiting
to destroy subsystems and components gracefully.

This fixes the segfault that was thrown on every program exit
when xcbWindow had captured a window.
2025-07-30 10:09:25 -04:00
hayodea e276fcbdce Mrntt: use keepLooping after exception; Mind: split code from mrntt
Mrntt now has the event loop structure required to orderly shut itself
down when it itself generates an exception. We can now post a message
within the catch{} blocks for Mrntt's event loop, telling Mrntt
to shut down the Mind threads and then shut itself down.

We also split the code to initialize threads etc out of mrntt and
put it into the Mind:: namespace.
2025-07-30 09:09:38 -04:00
hayodea 36c79f3a2e Threading: run all code in PThreads, add JOLTing & exception bubbling
This commit significantly restructures the way we setup threading in
SMO. We now don't use the CRT main() thread at all. It's only used
as a mechanism to ensure that Marionette doesn't execute before
global constructors have been executed.

JOLTing:

This is a simple ASIO post()ed message that makes each thread setup
its thread-local data pointer to its own ComponentThread object,
and then enter its main ASIO run() loop to await commands from
Marionette.

Exception bubbling:

We now cleanly cause mind threads to report their exceptions
to marionette, so that marionette can cleanly shut the mind down
in an orderly fashion.

Thread Control messaging API:

A namespace of asynchronous messages to be post()ed to threads to
control them. It enables us to pause and resume threads. This will
be very useful for Marionette when we add the ability for it to
suspend Salmanoff's running mind, inject new goals, inspect current
state, etc; and then resume the mind's execution.
2025-07-28 07:20:44 -04:00
hayodea 513405a831 Cmdline: Rename senseApiLibs, senseApiPaths to apiLibs, apiLibPaths 2025-07-25 01:51:36 -04:00
hayodea 7b962a75d3 VSCode: update config 2025-07-25 01:22:13 -04:00
hayodea 270437fdd4 xcbOrg/Window: Destroy connections when no longer in use 2025-07-25 01:21:26 -04:00
hayodea a17c940377 xcbWindow: Use angle bracketed includes 2025-07-24 06:15:09 -04:00
hayodea b28239550e xcbWindow: Group xcbXorg DLL state together 2025-07-24 06:14:08 -04:00
hayodea 1e17b83061 Split xcbXorg into xcbXorg and xcbWindow 2025-07-24 06:00:35 -04:00
hayodea 1bf5f46404 Provide dlopen() path searching hook to senseApi libs 2025-07-24 02:12:31 -04:00
hayodea 064dc43fbc SenseApiMgr: Permit multiple lib search paths 2025-07-23 00:12:50 -04:00
hayodea 020a4968e5 CMake: Add config.h.in 2025-07-22 23:28:59 -04:00
hayodea d0aa8e2306 Rename hk=>smo 2025-07-22 06:48:04 -04:00
hayodea 79f3e84ff8 CMake: update include path here? 2025-07-22 06:17:18 -04:00
hayodea 756571b9b4 Rename hcore=>smocore 2025-07-22 06:15:12 -04:00
hayodea 9c16aeeb55 Docs: rename harikoff=>salmanoff 2025-07-22 06:03:47 -04:00
hayodea d6a0b0301e Build: Rename Harikoff=>Salmanoff 2025-07-22 06:00:00 -04:00
hayodea e87656fd12 Fix build error from non-POD initializer list 2025-07-22 05:50:19 -04:00
hayodea f06aeb6c9b Formatting 2025-07-22 05:48:39 -04:00
hayodea c58d422158 Add images 2025-07-22 05:47:33 -04:00
hayodea 8dfb1e5b2f Use smaller PNG 2025-07-22 05:46:02 -04:00
hayodea 50b8aaf34d Update README for logo 2025-07-22 05:40:51 -04:00
hayodea 0f5e499d7c Add new logo for Salmanoff 2025-07-22 05:39:19 -04:00
hayodea 710749c399 Delete the autotools build system 2025-07-22 05:28:42 -04:00
hayodea 3503cce0db CMake: Check for libDl, conditionally check for libXCB 2025-07-22 05:19:26 -04:00
hayodea 90a0eebdd8 Add cscope ignore to .gitignore 2025-07-22 03:08:50 -04:00
hayodea 1540af1e74 Add temporary gitignore for the old autotools build dir 2025-07-22 02:46:43 -04:00
hayodea 065b2593f4 Add new CMake build system 2025-07-22 02:46:16 -04:00
hayodea e7974db324 Add Marionette 2025-07-22 02:03:45 -04:00
hayodea 336094ef90 Marionette: Create include dir and move body map headers in 2025-07-22 02:03:45 -04:00
hayodea d43a8af6bd Build: Print out the enabled common and wilzor libs 2025-07-22 02:03:45 -04:00
hayodea 37ad6995c3 Build: Add SenseApi DeepLIO2 Lidar fusion algo 2025-07-22 02:03:45 -04:00
hayodea c9e8a9f1fb Build: senseApis: Update help messages 2025-07-22 02:03:45 -04:00
hayodea dacc050bf9 Livox and R3Live shouldn't be over Eth intrinsically 2025-07-22 02:03:45 -04:00
hayodea f8825942b1 Add senseApis for Lidar devs and fusion APIs 2025-07-22 02:03:45 -04:00
hayodea e201b5e695 Build: Support common+sense+wilzor API libs; Move xcbXorg into commonLibs
xcbXorg is a connection manager lib that'll be used in common by all of
the xcb API frontends: xcbMouse, xcbWindow and xcbKeyboard. We moved
it into commonLibs to make it make more sense.

We also cleaned up the M4 scripting around AC_ARG_VAR-ing new common
libs as well as sense/wilzor libs.
2025-07-22 02:03:45 -04:00
hayodea 29a1e1ecf2 Docs:negtrin path: Add new thoughts 2025-07-22 02:03:45 -04:00
hayodea a5c2f47e9f Add design thoughts for intrins, compartmentalization, value-judgment 2025-07-22 02:03:45 -04:00
hayodea 42f55bb324 SenseApiDesc: Delete Sal_Mgmt_HkOps & document iface
We don't need the Sal_Mgmt_HkOps anymore because we won't
be using a callback model anymore. We'll be enqueuing messages.
2025-07-22 02:03:45 -04:00
hayodea 1450d745ab SenseApiDesc: use CPP concat to reduce typos 2025-07-22 02:03:45 -04:00
hayodea 76141e3a92 Fix indentation 2025-07-22 02:03:45 -04:00
hayodea 36592293dd DevSpec:lex: fix indentation 2025-07-22 02:03:45 -04:00
hayodea f1696f8272 DevSpec:lex: Remove annotation comment by GPT 2025-07-22 02:03:45 -04:00
hayodea 99c126a08c DevSpec:lex: Fix whitespace around EQUALS, fix backslash at EOF
* We had a prior issue where EQUALS would require that there be no
  whitespace between itself and its operands on either side. We got
  a bad solution from ChatGPT 4o. We got a proper solution now from
  o1.
* Previously, if a string ended with a backslash right before EOF, the
  backslash would be included. Now it will be dropped.
* Merge the two regexes for ignoring whitespace into one.
2025-07-22 02:03:45 -04:00
hayodea 293c1054d1 ComponentThreads: Add 2 new threads: body, world; comment threads.
We add 2 new threads for handling the interoceptors and extrospector
events. Also add comments explaining the purpose and role of each of
these major threads.
2025-07-22 02:03:45 -04:00
hayodea 38298a8ef8 DevSpec:Lex: silence warning about yyinput 2025-07-22 02:03:45 -04:00
hayodea 2b8b176038 xcbXorg: Add comments to major classes and funcs 2025-07-22 02:03:45 -04:00
hayodea 76e465bd1d devSpec:lex: Allow backslash escaping of strings
Now we can escape special characters without issue.
2025-07-22 02:03:45 -04:00