Struct tartan_arch::x86_common::protection::GateDescriptor
source · #[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§
source§impl GateDescriptor
impl GateDescriptor
sourcepub fn selector(self) -> Selector
pub fn selector(self) -> Selector
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.
sourcepub fn set_selector(&mut self, selector: Selector)
pub fn set_selector(&mut self, selector: Selector)
Update the selector pointing to the segment to be accessed through this gate.
sourcepub fn entry_point_offset(self) -> usize
pub fn entry_point_offset(self) -> usize
Offset of the entry point in code segment referenced by
selector
.
Only applies to call, interrupt, and trap gates.
sourcepub fn set_entry_point_offset(&mut self, offset: usize)
pub fn set_entry_point_offset(&mut self, offset: usize)
Update the offset of the entry point within the referenced code segment.
Trait Implementations§
source§impl Clone for GateDescriptor
impl Clone for GateDescriptor
source§fn clone(&self) -> GateDescriptor
fn clone(&self) -> GateDescriptor
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more