Make the load function safe

This commit is contained in:
Philipp Oppermann
2016-05-27 21:21:52 +02:00
parent 8540d3844b
commit 13e94de7b4
2 changed files with 3 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ impl Idt {
&mut self.0[entry as usize].options
}
pub unsafe fn load(&'static self) {
pub fn load(&'static self) {
use x86::dtables::{DescriptorTablePointer, lidt};
use core::mem::size_of;
@@ -21,7 +21,7 @@ impl Idt {
limit: (size_of::<Self>() - 1) as u16,
};
lidt(&ptr);
unsafe { lidt(&ptr) };
}
}