Interrupt enum class — hardware and software interrupt codes.
Interrupt
Interrupt codes used by the CPU and kernel.
@ Ok
No interrupt — normal execution.
@ Exit
Process requests termination.
StopReason
Reason why the execution engine returned control to the dispatcher.
@ Interrupted
A software/hardware interrupt requires kernel attention (syscall, I/O, page fault).
@ BudgetExhausted
Tick budget ran out (preemption / time slice expired).
@ Halted
Process was forcibly halted via halt().
@ Error
An unrecoverable error occurred (invalid instruction, segfault, etc.).
@ ProcessExited
Process executed Halt or Int Exit — normal termination.
std::uint32_t ProcessId
Unique identifier for a process.
constexpr ProcessId INVALID_PID
Sentinel value indicating an invalid/unassigned process ID.
Result of an execution burst returned by IExecutionEngine::execute().
static constexpr ExecutionResult error(ProcessId pid, std::size_t ticks, Interrupt intr) noexcept
Creates a result for an error condition.
ProcessId pid
The process that was executing.
std::size_t ticksConsumed
Number of ticks actually executed.
static constexpr ExecutionResult budgetExhausted(ProcessId pid, std::size_t ticks) noexcept
Creates a result for budget exhaustion (preemption).
static constexpr ExecutionResult exited(ProcessId pid, std::size_t ticks) noexcept
Creates a result for normal process exit.
StopReason reason
Why execution stopped.
Interrupt interrupt
The interrupt that caused the stop (if Interrupted).
static constexpr ExecutionResult interrupted(ProcessId pid, std::size_t ticks, Interrupt intr) noexcept
Creates a result for an interrupt requiring kernel attention.
static constexpr ExecutionResult halted(ProcessId pid, std::size_t ticks) noexcept
Creates a result for a forcibly halted process.
Common type aliases, sentinel constants, and forward declarations used throughout the Contur 2 kernel...