#[repr(C)]
pub struct GateDescriptor { pub flags: GateDescriptorFlags, /* private fields */ }
Available on x86 or x86-64 only.
Expand description

An entry in a segment descriptor table that points to an existing segment rather than defining a new one.

This includes:

  • Call gates, which allow controlled access to routines defined in a code segment with a different priority level or word size.
  • Interrupt and trap gates, which define handlers for interrupt vectors.
  • Task gates, which support hardware task switching. These are not supported in 64-bit mode.

Fields§

§flags: GateDescriptorFlags

Common gate descriptor settings.

Implementations§

Create a zero-initialized descriptor

Selector that points to the code or task state segment to be accessed through this gate.

For call, interrupt, and trap gates, this points to the code segment that contains the routine to be executed. For task gates, this points to a task state segment representing the task to activate.

Update the selector pointing to the segment to be accessed through this gate.

Offset of the entry point in code segment referenced by selector.

Only applies to call, interrupt, and trap gates.

source

pub fn set_entry_point_offset(&mut self, offset: usize)

Update the offset of the entry point within the referenced code segment.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.