Expand description
Task lifecycle: exit, join, stop (plan.md §5).
A preemptive task whose entry returns lands in
rivet_task_exit_core (the arch trampoline jumps there): the return
value (≤ 8 bytes, carried in a0/a1 — larger returns need the hidden
sret pointer which the trampoline cannot provide, so sizes > 8 are
rejected at spawn) is stored type-erased in the TCB, the task is marked
exited, and its joiner (if any) is woken. TaskHandle::join blocks
until then and recovers the value, or reports JoinError::Faulted
when the task was isolated by the fault policy (plan.md §3.4), or
JoinError::Stale when the handle’s generation no longer matches
(the slot was recycled).
Enums§
- Join
Error - Errors from
super::TaskHandle::join.
Functions§
- join_
task - Implementation of
super::TaskHandle::join. - rivet_
task_ exit_ core - Arch trampoline target: the task’s entry returned;
val_lo/val_hicarry the return value (or, for >8-byte results,val_lois a pointer into this task’s own stack). Stores the result, marks the task exited, wakes its joiner, and parks forever. - should_
stop - Cooperative cancellation (plan.md §5.4): poll this from the task’s main
loop; returns true once
super::TaskHandle::request_stopwas called on the current task.