Skip to content

Commit

Permalink
Move TSS busy information out of #Safety section
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Richey <[email protected]>
  • Loading branch information
josephlr committed Mar 30, 2022
1 parent 821e4ff commit 9ab8c70
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/instructions/tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,13 @@ pub fn sidt() -> DescriptorTablePointer {
/// [`tss_segment`](crate::structures::gdt::Descriptor::tss_segment)
/// for more information.
///
/// Calling `load_tss` with a busy TSS selector results in a `#GP` exception.
///
/// ## Safety
///
/// This function is unsafe because the caller must ensure that the given
/// `SegmentSelector` points to a valid TSS entry in the GDT, that is entry is
/// not busy, and that the corresponding data in the TSS is valid.
/// `SegmentSelector` points to a valid TSS entry in the GDT and that the
/// corresponding data in the TSS is valid.
#[inline]
pub unsafe fn load_tss(sel: SegmentSelector) {
unsafe {
Expand Down

0 comments on commit 9ab8c70

Please sign in to comment.