fix
This commit is contained in:
parent
ee82bc5705
commit
d958a103fa
|
@ -11,11 +11,9 @@ static mut LAPIC: LocalApic = unsafe { MaybeUninit::zeroed().assume_init() };
|
|||
static mut IDT: InterruptDescriptorTable = unsafe { MaybeUninit::zeroed().assume_init() };
|
||||
|
||||
#[repr(u8)]
|
||||
#[derive(Debug)]#[derive(Eq, Hash, PartialEq)]
|
||||
#[derive(Debug, Eq, Hash, PartialEq)]
|
||||
|
||||
|
||||
pub
|
||||
enum Interrupt {
|
||||
pub enum Interrupt {
|
||||
Timer = 32,
|
||||
ApicErr = u8::MAX - 1,
|
||||
Spurious = u8::MAX,
|
||||
|
@ -64,7 +62,7 @@ extern "x86-interrupt" fn page_fault(
|
|||
}
|
||||
|
||||
extern "x86-interrupt" fn timer(_isf: InterruptStackFrame) {
|
||||
interrupt(Interrupt::Timer);
|
||||
// interrupt(Interrupt::Timer);
|
||||
|
||||
unsafe {
|
||||
LAPIC.end_of_interrupt();
|
||||
|
@ -85,8 +83,7 @@ extern "x86-interrupt" fn spurious(_: InterruptStackFrame) {
|
|||
}
|
||||
}
|
||||
|
||||
fn interrupt(interrupt_type: Interrupt){
|
||||
|
||||
fn interrupt(interrupt_type: Interrupt) {
|
||||
use crate::arch::INTERRUPT_LIST;
|
||||
let il = INTERRUPT_LIST.lock();
|
||||
let val = il.list.get(&interrupt_type).unwrap();
|
||||
|
@ -94,12 +91,12 @@ fn interrupt(interrupt_type: Interrupt){
|
|||
use crate::holeybytes::kernel_services::service_definition_service::sds_search_service;
|
||||
let buffer = sds_search_service(val);
|
||||
if buffer != 0 {
|
||||
use alloc::vec::Vec;use crate::kmain::IPC_BUFFERS;
|
||||
use {crate::kmain::IPC_BUFFERS, alloc::vec::Vec};
|
||||
let mut buffs = IPC_BUFFERS.lock();
|
||||
match buffs.get_mut(&buffer) {
|
||||
Some(buff) => {
|
||||
let mut msg_vec = Vec::new();
|
||||
msg_vec.push(0xff);
|
||||
msg_vec.push(0xFF);
|
||||
buff.push(msg_vec.to_vec());
|
||||
log::debug!("Sent Message {:?} to Buffer({})", msg_vec, buffer);
|
||||
}
|
||||
|
@ -108,9 +105,6 @@ fn interrupt(interrupt_type: Interrupt){
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// log::info!("{}", buffer);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue