pub struct InterruptHandle<'a> {
interrupt_id: InterruptId,
cpu_id: CpuId,
completed: bool,
manager: &'a mut InterruptManager,
}
Expand description
Handle for managing interrupt processing
This provides a safe interface for interrupt handlers to interact with the interrupt controller without direct access.
Fields§
§interrupt_id: InterruptId
§cpu_id: CpuId
§completed: bool
§manager: &'a mut InterruptManager
Implementations§
Source§impl<'a> InterruptHandle<'a>
impl<'a> InterruptHandle<'a>
Sourcepub fn new(
interrupt_id: InterruptId,
cpu_id: CpuId,
manager: &'a mut InterruptManager,
) -> Self
pub fn new( interrupt_id: InterruptId, cpu_id: CpuId, manager: &'a mut InterruptManager, ) -> Self
Create a new interrupt handle
Sourcepub fn interrupt_id(&self) -> InterruptId
pub fn interrupt_id(&self) -> InterruptId
Get the interrupt ID
Sourcepub fn complete(&mut self) -> InterruptResult<()>
pub fn complete(&mut self) -> InterruptResult<()>
Mark the interrupt as completed
This should be called when the handler has finished processing the interrupt.
Sourcepub fn is_completed(&self) -> bool
pub fn is_completed(&self) -> bool
Check if the interrupt has been completed
Sourcepub fn enable_interrupt(
&mut self,
target_interrupt: InterruptId,
) -> InterruptResult<()>
pub fn enable_interrupt( &mut self, target_interrupt: InterruptId, ) -> InterruptResult<()>
Enable another interrupt
Sourcepub fn disable_interrupt(
&mut self,
target_interrupt: InterruptId,
) -> InterruptResult<()>
pub fn disable_interrupt( &mut self, target_interrupt: InterruptId, ) -> InterruptResult<()>
Disable another interrupt