Interrupt Forwarding #22

Merged
koniifer merged 8 commits from kodin/ableos-idl:kold/interrupts into master 2024-11-26 15:53:52 -06:00
Showing only changes of commit 4a45c929a1 - Show all commits

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