x86_64::instructions::interrupts

Function software_interrupt

Source
pub unsafe fn software_interrupt<const NUM: u8>()
Expand description

Generate a software interrupt by invoking the int instruction.

ยงSafety

Invoking an arbitrary interrupt is unsafe. It can cause your system to crash if you invoke a double-fault (#8) or machine-check (#18) exception. It can also cause memory/register corruption depending on the interrupt implementation (if it expects values/pointers to be passed in registers).