Added the sending of the interrupt to subscribed processes

This commit is contained in:
Talha Qamar 2024-11-27 00:19:42 +05:00
parent f65a5bd79c
commit 4a45c929a1

View file

@ -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);
}
}