Expand description
phase-359 W10 — one place that spawns a platform task from Rust.
Moved here from nros-node::executor::platform_task: three Rust callers now
need it (nros-node’s worker pool and open_threaded, nros-cpp’s native
tier runtime), and a helper for an ABI belongs beside the ABI rather than
inside one of its consumers.
Two executor-owned workers need a thread: the per-OS-priority pool
(os_priority in nros-node’s executor) and the signalfd forwarder in spin.rs. Both were
std::thread; both are platform tasks now, so the allocate-spawn-join
sequence lives here rather than being written twice.
The storage size is ASKED FOR (nros_platform_task_storage_{size,align}),
never assumed. A hard-coded size is issue 0570 exactly: a Rust-side
pthread_attr_t mirror was 36 bytes shorter than NuttX’s, and
pthread_attr_init wrote the difference into the caller’s frame. The probes
exist so no caller has to guess.
Structs§
- Platform
Task - A spawned platform task plus the storage the platform tracks it in.