1
0
Fork 0
forked from AbleOS/ableos

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) { extern "x86-interrupt" fn timer(_isf: InterruptStackFrame) {
// interrupt(Interrupt::Timer); interrupt(Interrupt::Timer);
unsafe { unsafe {
LAPIC.end_of_interrupt(); LAPIC.end_of_interrupt();
@ -85,6 +85,7 @@ extern "x86-interrupt" fn spurious(_: InterruptStackFrame) {
fn interrupt(interrupt_type: Interrupt) { fn interrupt(interrupt_type: Interrupt) {
use crate::arch::INTERRUPT_LIST; use crate::arch::INTERRUPT_LIST;
use crate::kmain::EXECUTOR;
let il = INTERRUPT_LIST.lock(); let il = INTERRUPT_LIST.lock();
let val = il.list.get(&interrupt_type).unwrap(); let val = il.list.get(&interrupt_type).unwrap();
@ -107,4 +108,8 @@ fn interrupt(interrupt_type: Interrupt) {
// log::info!("{}", buffer); // log::info!("{}", buffer);
} }
unsafe{
EXECUTOR.send_interrupt(interrupt_type as u8);
}
} }