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 moresource§impl Debug for GateDescriptor
impl Debug for GateDescriptor
source§impl Default for GateDescriptor
impl Default for GateDescriptor
source§impl PartialEq for GateDescriptor
impl PartialEq for GateDescriptor
impl Copy for GateDescriptor
impl Eq for GateDescriptor
impl StructuralPartialEq for GateDescriptor
Auto Trait Implementations§
impl Freeze for GateDescriptor
impl RefUnwindSafe for GateDescriptor
impl Send for GateDescriptor
impl Sync for GateDescriptor
impl Unpin for GateDescriptor
impl UnwindSafe for GateDescriptor
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)