pub struct EntryOptions { /* private fields */ }Expand description
Represents the 4 non-offset bytes of an IDT entry.
Implementations§
Source§impl EntryOptions
impl EntryOptions
Sourcepub unsafe fn set_code_selector(&mut self, cs: SegmentSelector) -> &mut Self
pub unsafe fn set_code_selector(&mut self, cs: SegmentSelector) -> &mut Self
Set the code segment that will be used by this interrupt.
§Safety
This function is unsafe because the caller must ensure that the passed segment selector points to a valid, long-mode code segment.
Sourcepub fn set_present(&mut self, present: bool) -> &mut Self
pub fn set_present(&mut self, present: bool) -> &mut Self
Set or reset the preset bit.
Sourcepub fn disable_interrupts(&mut self, disable: bool) -> &mut Self
pub fn disable_interrupts(&mut self, disable: bool) -> &mut Self
Let the CPU disable hardware interrupts when the handler is invoked. By default, interrupts are disabled on handler invocation.
Sourcepub fn set_privilege_level(&mut self, dpl: PrivilegeLevel) -> &mut Self
pub fn set_privilege_level(&mut self, dpl: PrivilegeLevel) -> &mut Self
Set the required privilege level (DPL) for invoking the handler. The DPL can be 0, 1, 2, or 3, the default is 0. If CPL < DPL, a general protection fault occurs.
Sourcepub unsafe fn set_stack_index(&mut self, index: u16) -> &mut Self
pub unsafe fn set_stack_index(&mut self, index: u16) -> &mut Self
Assigns a Interrupt Stack Table (IST) stack to this handler. The CPU will then always switch to the specified stack before the handler is invoked. This allows kernels to recover from corrupt stack pointers (e.g., on kernel stack overflow).
An IST stack is specified by an IST index between 0 and 6 (inclusive). Using the same stack for multiple interrupts can be dangerous when nested interrupts are possible.
This function panics if the index is not in the range 0..7.
§Safety
This function is unsafe because the caller must ensure that the passed stack index is valid and not used by other interrupts. Otherwise, memory safety violations are possible.
Trait Implementations§
Source§impl Clone for EntryOptions
impl Clone for EntryOptions
Source§fn clone(&self) -> EntryOptions
fn clone(&self) -> EntryOptions
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EntryOptions
Source§impl Debug for EntryOptions
impl Debug for EntryOptions
Source§impl PartialEq for EntryOptions
impl PartialEq for EntryOptions
impl StructuralPartialEq for EntryOptions
Auto Trait Implementations§
impl Freeze for EntryOptions
impl RefUnwindSafe for EntryOptions
impl Send for EntryOptions
impl Sync for EntryOptions
impl Unpin for EntryOptions
impl UnsafeUnpin for EntryOptions
impl UnwindSafe for EntryOptions
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)