//! User termination scenarios shared with the kernel checker.

/// Operation selected by the parent through the argument page.
export union Scenario: Copy {
    /// Exit without an argument page.
    Exit = 0,
    /// Abort through the public syscall wrapper.
    Abort = 1,
    /// Raise a user breakpoint through a failed assertion.
    Breakpoint = 2,
    /// Destroy the current domain.
    DestroySelf = 3,
    /// Call the raw query boundary with an invalid self handle.
    InvalidSelfQuery = 4,
    /// Query the installed finish device.
    DeviceQuery = 8,
}

/// Status returned by the child with no argument page.
export constant EXIT_STATUS: u32 = 37;
/// Status returned after a successful device query.
export constant DEVICE_STATUS: u32 = 51;
/// RISC-V breakpoint exception code reported to the parent.
export constant BREAKPOINT_CAUSE: u32 = 3;
/// Emulator finish-device physical address.
export constant FINISH_ADDRESS: u64 = 0x10001000;
