linted code

Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
This commit is contained in:
juju committed 2022-12-11 01:39:22 +01:00
1 parent 745b8efb8f
commit b5ebe0d4ad
12 files changed
+72 -62

No files matched your search

+4 -6
View File
@@ -1,11 +1,11 @@
use crate::memory::gdt;
use crate::hlt_loop;
use crate::drivers::vga::{self, Color, ColorCode};
use crate::{println};
use crate::hlt_loop;
use crate::memory::gdt;
use crate::println;
use lazy_static::lazy_static;
use pic::{init_pic, keyboard_interrupt_handler, timer_interrupt_handler, InterruptIndex};
use x86_64::structures::idt::PageFaultErrorCode;
use x86_64::structures::idt::{InterruptDescriptorTable, InterruptStackFrame};
use pic::{InterruptIndex, init_pic, keyboard_interrupt_handler, timer_interrupt_handler};
pub mod pic;
@@ -64,5 +64,3 @@ extern "x86-interrupt" fn double_fault_handler(
) -> ! {
panic!("EXCEPTION: DOUBLE FAULT\n{:#?}", stack_frame);
}
+2 -2
View File
@@ -1,7 +1,7 @@
use super::{PICS, InterruptIndex};
use super::{InterruptIndex, PICS};
use x86_64::instructions::port::Port;
use x86_64::structures::idt::{InterruptStackFrame};
use x86_64::structures::idt::InterruptStackFrame;
pub const PS2_CONTROLLER_PORT: u16 = 0x60;
+4 -7
View File
@@ -1,15 +1,14 @@
use pic8259::ChainedPics;
use crate::{println};
pub use pit::{timer_interrupt_handler};
use crate::println;
pub use keyboard::keyboard_interrupt_handler;
use pic8259::ChainedPics;
pub use pit::timer_interrupt_handler;
pub mod pit;
pub mod keyboard;
pub mod pit;
pub const PIC_1_OFFSET: u8 = 32;
pub const PIC_2_OFFSET: u8 = PIC_1_OFFSET + 8;
#[derive(Debug, Clone, Copy)]
#[repr(u8)]
pub enum InterruptIndex {
@@ -34,5 +33,3 @@ pub fn init_pic() {
println!("Initializing PIC");
unsafe { PICS.lock().initialize() };
}
+1 -2
View File
@@ -1,11 +1,10 @@
use super::{PICS, InterruptIndex};
use super::{InterruptIndex, PICS};
use x86_64::structures::idt::InterruptStackFrame;
static mut TICKS: u64 = 0;
pub fn gettick() -> u64 {
unsafe { return TICKS }
}
pub extern "x86-interrupt" fn timer_interrupt_handler(_stack_frame: InterruptStackFrame) {
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.