Skip to content

Commit 03583d3

Browse files
authored
Remove deprecation warnings (#217)
1 parent 1ece87b commit 03583d3

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/sys/gdt.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
use lazy_static::lazy_static;
2+
use x86_64::VirtAddr;
3+
use x86_64::instructions::segmentation::{CS, Segment};
4+
use x86_64::instructions::tables::load_tss;
25
use x86_64::structures::gdt::{Descriptor, GlobalDescriptorTable, SegmentSelector};
36
use x86_64::structures::tss::TaskStateSegment;
4-
use x86_64::VirtAddr;
57

68
pub const DOUBLE_FAULT_IST_INDEX: u16 = 0;
79

@@ -38,12 +40,9 @@ struct Selectors {
3840
}
3941

4042
pub fn init() {
41-
use x86_64::instructions::segmentation::set_cs;
42-
use x86_64::instructions::tables::load_tss;
43-
4443
GDT.0.load();
4544
unsafe {
46-
set_cs(GDT.1.code_selector);
45+
CS::set_reg(GDT.1.code_selector);
4746
load_tss(GDT.1.tss_selector);
4847
}
4948
}

0 commit comments

Comments
 (0)