Skip to main content

ProcessKernelFn

Type Alias ProcessKernelFn 

Source
pub type ProcessKernelFn = fn(state: *mut u8, activation: *mut ActivationRecord, resume: ResumeInfo) -> ProcessResult;
Expand description

The compiled-kernel calling convention every process TEMPLATE compiles to (process.md §4). Not the literal ABI-crossing symbol — that is sv_sim_abi::ProcessFn (extern "C", using the frozen SimHandle/ EvalResult/RescheduleReq shapes so every field stays FFI-safe). This is the richer, process-track-internal Rust-level decoding of that call, matching process.md’s own explicitly-flagged scope (“proposed here at the logical (Suspend/ResumeArg) level only; the physical ABI needs to be pinned jointly with CODEGEN”) — an ordinary Rust fn pointer, deliberately not extern "C", since ProcessResult owns a heap-allocated field (WaitSpec::EdgeList’s Vec<..>, via ProcessStatus::Suspended) that is not FFI-safe by value. ActivationRecord itself is #[repr(C)]/POD (see its own doc comment) — it is the return type, not the activation pointer, that blocks extern "C" here.