Function hal_x86_64::cpu::intrinsics::ltr
source · pub unsafe fn ltr(sel: Selector)
Expand description
Perform one x86 ltr
(Load Task Register) instruction.
ltr
loads a task state segment (TSS) selector into the current task
register.
Safety
- Intrinsics are inherently unsafe — this is just a less ugly way of writing inline assembly.
- The provided segment selector must select a task state segment in the GDT.
- The pointed TSS must not be deallocated or overwritten while it is active.
Prefer the higher-level task::StateSegment::load_tss
API when possible.