pub enum LocalDescriptorTableRegister {}
Expand description
LDTR
: Contains a Selector
referencing a SegmentDescriptor
that points to the
the local descriptor table (LDT).
Note that this type cannot be instantiated. It simply serves as a namespace for the
get
and set
methods, which work on a Selector
instance.
Implementations§
source§impl LocalDescriptorTableRegister
impl LocalDescriptorTableRegister
sourcepub unsafe fn set(selector: Selector)
pub unsafe fn set(selector: Selector)
Update the register with the value in this struct.
The value must point to an entry in the global descriptor table
(local
== false
) with the
SystemDescriptorType::LocalDescriptorTable
type.
§Safety
This register fundamentally affects memory accesses and can have an impact on memory safety.
sourcepub unsafe fn current_descriptor() -> *const SegmentDescriptor
pub unsafe fn current_descriptor() -> *const SegmentDescriptor
Get a pointer to the SegmentDescriptor
for the currently-loaded local
descriptor table, using the value of this register.
§Safety
The LDTR must not loaded with a selector for a valid LDR segment descriptor. The returned pointer is only valid until the LDTR is modified.