#[repr(C, packed(1))]pub struct GlobalDescriptorTableRegister {
pub limit: u16,
pub address: usize,
}
Available on x86 or x86-64 only.
Expand description
GDTR
: Points to the memory range of the global descriptor table (GDT).
Fields§
§limit: u16
The inclusive maximum address offset (i.e., size - 1) of the descriptor table.
address: usize
Base address of the descriptor table
Implementations§
source§impl GlobalDescriptorTableRegister
impl GlobalDescriptorTableRegister
sourcepub unsafe fn set(value: &Self)
pub unsafe fn set(value: &Self)
Update the register to the given value.
§Safety
This register fundamentally affects memory accesses and can have an impact on memory safety.
sourcepub unsafe fn set_with_segments(
gdt_pointer: &Self,
code_selector: Selector,
data_selector: Selector,
)
pub unsafe fn set_with_segments( gdt_pointer: &Self, code_selector: Selector, data_selector: Selector, )
Update the global descriptor table pointer and all segment registers.
§Safety
This register fundamentally affects memory accesses and can have an impact on memory safety.
Trait Implementations§
source§impl Clone for GlobalDescriptorTableRegister
impl Clone for GlobalDescriptorTableRegister
source§fn clone(&self) -> GlobalDescriptorTableRegister
fn clone(&self) -> GlobalDescriptorTableRegister
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 Default for GlobalDescriptorTableRegister
impl Default for GlobalDescriptorTableRegister
source§fn default() -> GlobalDescriptorTableRegister
fn default() -> GlobalDescriptorTableRegister
Returns the “default value” for a type. Read more
source§impl PartialEq for GlobalDescriptorTableRegister
impl PartialEq for GlobalDescriptorTableRegister
source§fn eq(&self, other: &GlobalDescriptorTableRegister) -> bool
fn eq(&self, other: &GlobalDescriptorTableRegister) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl Copy for GlobalDescriptorTableRegister
impl Eq for GlobalDescriptorTableRegister
impl StructuralPartialEq for GlobalDescriptorTableRegister
Auto Trait Implementations§
impl Freeze for GlobalDescriptorTableRegister
impl RefUnwindSafe for GlobalDescriptorTableRegister
impl Send for GlobalDescriptorTableRegister
impl Sync for GlobalDescriptorTableRegister
impl Unpin for GlobalDescriptorTableRegister
impl UnwindSafe for GlobalDescriptorTableRegister
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
)