Expand description
Private, unsupported stack backend for vthread; not an independent public API.
Direct downstream use has no compatibility contract. Cleanup mount callbacks are runtime integration hooks and must succeed. A persistent mount failure during lexical scope exit aborts: borrowed executable stacks cannot safely escape their environment.
Layers, lowest first:
stack_unixandstack: guard-page-backed mappings stamped with a pool identity.arch: per-target context switch and first-frame fabrication, nothing more.entryandcontext: the entry closure and control block at the top of each stack, and the command and outcome protocol between a carrier and its fiber.engine: the fiber lifecycle state machine, including forced reclamation.mount,fiber,lease,scoped, andpool: the carrier-facing ownership model the scheduler consumes.
Structs§
- Fiber
- One carrier-local stackful execution context.
- Fiber
Lease - An internal carrier-local lease; scope exit revokes its executable stack.
- Fiber
Scope - Lexical ownership for a bounded set of borrowed, non-Send stacks.
- Mapped
Stack - One private anonymous mapping whose lowest page is an inaccessible guard.
- Park
Request - Scheduler data supplied when a task parks.
- Park
Token - Identity for one generation of a parking operation.
- Stack
Pool - A bounded cache of guard-page-backed stacks.
- Stack
Pool Snapshot - Operational counters for a stack pool.
Enums§
- Fiber
State - The outcome of mounting a fiber once.
- Resume
- A carrier decision delivered to the operation that suspended the fiber.
- Suspend
Error - Why a requested fiber suspension could not safely start.
- Suspension
- A reason a mounted fiber returned control to its carrier.
Constants§
- STACK_
ALIGNMENT - Required stack pointer alignment at call boundaries on both supported targets.
Functions§
- fiber_
scope - Runs a lexical borrowed-stack owner; leaked leases are inert after this returns.
- suspend
- Suspends the currently mounted fiber.