Enum gdt::Descriptor
source · pub enum Descriptor {
UserSegment(u64),
SystemSegment(u64, u64),
}
Expand description
The two kinds of descriptor entries in the GDT.
Variants§
UserSegment(u64)
UserSegment is used for both code and data segments, in both the kernel and in user space.
SystemSegment(u64, u64)
SystemSegment is used only for TSS.
Implementations§
source§impl Descriptor
impl Descriptor
pub const fn kernel_code_segment() -> Descriptor
pub const fn kernel_data_segment() -> Descriptor
pub const fn user_code_32_segment() -> Descriptor
pub const fn user_data_32_segment() -> Descriptor
pub const fn user_code_64_segment() -> Descriptor
pub const fn user_data_64_segment() -> Descriptor
pub fn tss_segment(tss: &TaskStateSegment) -> Descriptor
Auto Trait Implementations§
impl RefUnwindSafe for Descriptor
impl Send for Descriptor
impl Sync for Descriptor
impl Unpin for Descriptor
impl UnwindSafe for Descriptor
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