Expand description
The Rust sched task runners’ level core: one executor per core, a worker per level. The Rust sched task runners’ LEVEL core: one executor per core, a worker per level over it.
The C-ABI runners reach this through nros-cpp’s scheduler FFI
(nros_cpp_level_open, nros_cpp_level_spin_once); a Rust runner holds
the core’s ExecutorNodeRuntime itself and uses the same three steps:
-
LevelCore::new– the boot level’s runtime, leaked for the image’s life, with the port’s recursive priority-inheriting mutex and the calling thread’s identity installed as the executor’s lock (nros_node::executor::exec_lock::ExecLock) when more than one level runs, the level count stated, and the boot level made current. -
LevelCore::open_level+LevelCore::with_runtime– on a level’s own thread: its worker record (leaked with the level), its waiter linked into the executor’s arrival routing, then the image’s setup run on the shared runtime with the level’s groups active and the level registering, all under the lock. -
LevelCore::spin_level_once/LevelCore::spin_boot_once– one pass of a level’s worker (its band, the lock released around each callback, then the ticks of the components its level registered) or of the boot level (the executor’s own worker: transport, executor-wide chores, the boot level’s component ticks). A component ticks on the level that registered it, never on two. -
LevelCore::into_runtime: once every other level’s thread has stopped and been joined, the boot level takes the runtime back (the lock removed), so a hosted runner can close its session and return. An RTOS runner never calls it: its levels spin for the image’s life.
Every access goes through the raw runtime pointer with the lock taken first, so no reference to the runtime or its executor is live across another thread’s pass.
Structs§
- Band
Waiter - A band worker’s
wake object and the slots it answers for. The transport’s arrival path
reads it without the executor’s lock, so it is
'staticand its fields are atomics or fixed at construction; it is linked into the executor’s arrival routing byExecutor::attach_band_workerand never unlinked. - Level
Core - The core’s runtime, shared by every level of the image.
Copy: each level’s thread carries the handle. - RunTo
Completion Levels - Levels that RUN TO COMPLETION: one pass per wake, never a blocking wait.
Enums§
- Level
Error - Why a level could not be set up.
Type Aliases§
- Band
Wait Fn - How a band worker waits on its own wake object:
at most
usmicroseconds, returning early when the object is signalled (WorkerWakeFn). The answer is ignored: either way the worker re-scans. - Worker
Wake Fn - How a scheduler signals a worker’s wake object (
NodeWakeon a real port; a mock kernel in the tests).