Interrupt Forwarding #22
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue