Trait x86_64::instructions::segmentation::Segment[][src]

pub trait Segment {
    fn get_reg() -> SegmentSelector;
unsafe fn set_reg(sel: SegmentSelector); }
Expand description

An x86 segment

Segment registers on x86 are 16-bit SegmentSelectors, which index into the GlobalDescriptorTable. The corresponding GDT entry is used to configure the segment itself. Note that most segmentation functionality is disabled in 64-bit mode. See the individual segments for more information.

Required methods

Returns the current value of the segment register.

Reload the segment register. Depending on the segment, this may also reconfigure the corresponding segment.

Safety

This function is unsafe because the caller must ensure that sel is a valid segment descriptor, and that reconfiguring the segment will not cause undefined behavior.

Implementors