Struct x86_64::structures::idt::EntryOptions[][src]

#[repr(transparent)]
pub struct EntryOptions(_);
Expand description

Represents the options field of an IDT entry.

Implementations

impl EntryOptions[src]

pub fn set_present(&mut self, present: bool) -> &mut Self[src]

Set or reset the preset bit.

pub fn disable_interrupts(&mut self, disable: bool) -> &mut Self[src]

Let the CPU disable hardware interrupts when the handler is invoked. By default, interrupts are disabled on handler invocation.

pub fn set_privilege_level(&mut self, dpl: PrivilegeLevel) -> &mut Self[src]

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.

This function panics for a DPL > 3.

pub unsafe fn set_stack_index(&mut self, index: u16) -> &mut Self[src]

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

impl Clone for EntryOptions[src]

fn clone(&self) -> EntryOptions[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for EntryOptions[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl PartialEq<EntryOptions> for EntryOptions[src]

fn eq(&self, other: &EntryOptions) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &EntryOptions) -> bool[src]

This method tests for !=.

impl Copy for EntryOptions[src]

impl StructuralPartialEq for EntryOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.