#[repr(C)]pub struct Entry<F> {
pointer_low: u16,
code_segment: SegmentSelector,
options: EntryOptions,
pointer_middle: u16,
phantom: PhantomData<F>,
}
Expand description
An Interrupt Descriptor Table entry.
The generic parameter can either be HandlerFunc
or HandlerFuncWithErrCode
, depending
on the interrupt vector.
Fields§
§pointer_low: u16
§code_segment: SegmentSelector
§options: EntryOptions
§pointer_middle: u16
§phantom: PhantomData<F>
Implementations§
source§impl<F> Entry<F>
impl<F> Entry<F>
sourcefn set_handler_addr(&mut self, addr: u32) -> &mut EntryOptions
fn set_handler_addr(&mut self, addr: u32) -> &mut EntryOptions
Set the handler address for the IDT entry and sets the present bit.
For the code selector field, this function uses the code segment selector currently active in the CPU.
The function returns a mutable reference to the entry’s options that allows further customization.
source§impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack)>
impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack)>
sourcepub fn set_handler_fn(
&mut self,
handler: unsafe extern "x86-interrupt" fn(_: InterruptStack)
) -> &mut EntryOptions
pub fn set_handler_fn( &mut self, handler: unsafe extern "x86-interrupt" fn(_: InterruptStack) ) -> &mut EntryOptions
Set the handler function for the IDT entry and sets the present bit.
For the code selector field, this function uses the code segment selector currently active in the CPU.
The function returns a mutable reference to the entry’s options that allows further customization.
source§impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: u32)>
impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: u32)>
sourcepub fn set_handler_fn(
&mut self,
handler: unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: u32)
) -> &mut EntryOptions
pub fn set_handler_fn( &mut self, handler: unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: u32) ) -> &mut EntryOptions
Set the handler function for the IDT entry and sets the present bit.
For the code selector field, this function uses the code segment selector currently active in the CPU.
The function returns a mutable reference to the entry’s options that allows further customization.
source§impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: PageFaultError)>
impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: PageFaultError)>
sourcepub fn set_handler_fn(
&mut self,
handler: unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: PageFaultError)
) -> &mut EntryOptions
pub fn set_handler_fn( &mut self, handler: unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: PageFaultError) ) -> &mut EntryOptions
Set the handler function for the IDT entry and sets the present bit.
For the code selector field, this function uses the code segment selector currently active in the CPU.
The function returns a mutable reference to the entry’s options that allows further customization.
source§impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack) -> !>
impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack) -> !>
sourcepub fn set_handler_fn(
&mut self,
handler: unsafe extern "x86-interrupt" fn(_: InterruptStack) -> !
) -> &mut EntryOptions
pub fn set_handler_fn( &mut self, handler: unsafe extern "x86-interrupt" fn(_: InterruptStack) -> ! ) -> &mut EntryOptions
Set the handler function for the IDT entry and sets the present bit.
For the code selector field, this function uses the code segment selector currently active in the CPU.
The function returns a mutable reference to the entry’s options that allows further customization.
source§impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: u32) -> !>
impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: u32) -> !>
sourcepub fn set_handler_fn(
&mut self,
handler: unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: u32) -> !
) -> &mut EntryOptions
pub fn set_handler_fn( &mut self, handler: unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: u32) -> ! ) -> &mut EntryOptions
Set the handler function for the IDT entry and sets the present bit.
For the code selector field, this function uses the code segment selector currently active in the CPU.
The function returns a mutable reference to the entry’s options that allows further customization.