⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

boot_run_forked_child

Function boot_run_forked_child 

Source
pub fn boot_run_forked_child(
    child_pid: ProcessId,
    parent_pid: ProcessId,
    parent_tid: ThreadId,
) -> bool
Expand description

Run a forked child process inline from the parent’s wait loop.

Called from wait_process_with_options when in boot execution mode (no preemptive scheduler). The child was created by fork() and is Ready but has never been scheduled. This function:

  1. Saves and restores the parent’s boot return context (BOOT_RETURN globals)
  2. Saves and restores the parent’s BOOT_CURRENT PID/TID
  3. Handles swapgs rebalancing (we’re inside a syscall handler)
  4. Runs the child to completion via enter_forked_child_returnable

Returns true if the child was run, false if not in boot context.