From 5054e48c9af411d26c04ab7d9bb3acfff9fa3076 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Fri, 27 May 2016 21:22:16 +0200 Subject: [PATCH] Remove unneeded `pub`s --- src/interrupts/idt.rs | 4 ++-- src/interrupts/mod.rs | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/interrupts/idt.rs b/src/interrupts/idt.rs index 89922446..43ecb467 100644 --- a/src/interrupts/idt.rs +++ b/src/interrupts/idt.rs @@ -67,13 +67,13 @@ impl Entry { pub struct EntryOptions(BitField); 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 diff --git a/src/interrupts/mod.rs b/src/interrupts/mod.rs index 2a29469d..e628d1b9 100644 --- a/src/interrupts/mod.rs +++ b/src/interrupts/mod.rs @@ -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 {} }