From 4a45c929a1de934b10a35911acc5eacc50279bbf Mon Sep 17 00:00:00 2001 From: Talha Qamar Date: Wed, 27 Nov 2024 00:19:42 +0500 Subject: [PATCH] Added the sending of the interrupt to subscribed processes --- kernel/src/arch/x86_64/interrupts.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/src/arch/x86_64/interrupts.rs b/kernel/src/arch/x86_64/interrupts.rs index 4bd3c8a9..28b432c9 100644 --- a/kernel/src/arch/x86_64/interrupts.rs +++ b/kernel/src/arch/x86_64/interrupts.rs @@ -62,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,6 +85,7 @@ extern "x86-interrupt" fn spurious(_: InterruptStackFrame) { fn interrupt(interrupt_type: Interrupt) { use crate::arch::INTERRUPT_LIST; + use crate::kmain::EXECUTOR; let il = INTERRUPT_LIST.lock(); let val = il.list.get(&interrupt_type).unwrap(); @@ -107,4 +108,8 @@ fn interrupt(interrupt_type: Interrupt) { // log::info!("{}", buffer); } + + unsafe{ + EXECUTOR.send_interrupt(interrupt_type as u8); + } }