Remove unneeded pubs

This commit is contained in:
Philipp Oppermann
2016-05-27 21:22:16 +02:00
parent 13e94de7b4
commit 5054e48c9a
2 changed files with 7 additions and 6 deletions

View File

@@ -67,13 +67,13 @@ impl Entry {
pub struct EntryOptions(BitField<u16>);
impl EntryOptions {
pub fn minimal() -> Self {
fn minimal() -> Self {
let mut options = BitField::new(0);
options.set_range(9..12, 0b111); // required 'one' bits
EntryOptions(options)
}
pub fn new() -> Self {
fn new() -> Self {
let mut options = Self::minimal();
options.set_present(true);
options

View File

@@ -68,22 +68,23 @@ pub fn init() {
IDT.load();
}
pub extern "C" fn divide_by_zero_handler() -> ! {
extern "C" fn divide_by_zero_handler() -> ! {
unsafe { print_error(format_args!("EXCEPTION: DIVIDE BY ZERO")) };
loop {}
}
pub extern "C" fn double_fault_handler() -> ! {
extern "C" fn double_fault_handler() -> ! {
unsafe { print_error(format_args!("EXCEPTION: DOUBLE FAULT")) };
unsafe { asm!("iretq")};
loop {}
}
pub extern "C" fn general_protection_fault_handler() -> ! {
extern "C" fn general_protection_fault_handler() -> ! {
unsafe { print_error(format_args!("EXCEPTION: GENERAL PROTECTION FAULT")) };
loop {}
}
pub extern "C" fn page_fault_handler() -> ! {
extern "C" fn page_fault_handler() -> ! {
unsafe { print_error(format_args!("EXCEPTION: PAGE FAULT")) };
loop {}
}