mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-17 06:47:49 +00:00
Run rustfmt
This commit is contained in:
@@ -10,8 +10,8 @@ pub static PICS: spin::Mutex<ChainedPics> =
|
|||||||
pub const TIMER_INTERRUPT_ID: u8 = PIC_1_OFFSET;
|
pub const TIMER_INTERRUPT_ID: u8 = PIC_1_OFFSET;
|
||||||
pub const KEYBOARD_INTERRUPT_ID: u8 = PIC_1_OFFSET + 1;
|
pub const KEYBOARD_INTERRUPT_ID: u8 = PIC_1_OFFSET + 1;
|
||||||
|
|
||||||
use x86_64::structures::idt::{ExceptionStackFrame, InterruptDescriptorTable};
|
|
||||||
use gdt;
|
use gdt;
|
||||||
|
use x86_64::structures::idt::{ExceptionStackFrame, InterruptDescriptorTable};
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
static ref IDT: InterruptDescriptorTable = {
|
static ref IDT: InterruptDescriptorTable = {
|
||||||
@@ -50,10 +50,7 @@ extern "x86-interrupt" fn double_fault_handler(
|
|||||||
|
|
||||||
extern "x86-interrupt" fn timer_interrupt_handler(_stack_frame: &mut ExceptionStackFrame) {
|
extern "x86-interrupt" fn timer_interrupt_handler(_stack_frame: &mut ExceptionStackFrame) {
|
||||||
print!(".");
|
print!(".");
|
||||||
unsafe {
|
unsafe { PICS.lock().notify_end_of_interrupt(TIMER_INTERRUPT_ID) }
|
||||||
PICS.lock()
|
|
||||||
.notify_end_of_interrupt(TIMER_INTERRUPT_ID)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "x86-interrupt" fn keyboard_interrupt_handler(_stack_frame: &mut ExceptionStackFrame) {
|
extern "x86-interrupt" fn keyboard_interrupt_handler(_stack_frame: &mut ExceptionStackFrame) {
|
||||||
@@ -80,8 +77,5 @@ extern "x86-interrupt" fn keyboard_interrupt_handler(_stack_frame: &mut Exceptio
|
|||||||
print!("{}", key);
|
print!("{}", key);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe {
|
unsafe { PICS.lock().notify_end_of_interrupt(KEYBOARD_INTERRUPT_ID) }
|
||||||
PICS.lock()
|
|
||||||
.notify_end_of_interrupt(KEYBOARD_INTERRUPT_ID)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user