forked from Bananymous/banan-os
Kernel: Add check for panic in timer interrupt handler
Previously processors would not get notified about kernel panic if they were idling
This commit is contained in:
parent
23194d1f53
commit
869bba4dad
|
@ -335,6 +335,14 @@ done:
|
||||||
|
|
||||||
extern "C" void cpp_timer_handler()
|
extern "C" void cpp_timer_handler()
|
||||||
{
|
{
|
||||||
|
if (g_paniced)
|
||||||
|
{
|
||||||
|
dprintln("Processor {} halted", Processor::current_id());
|
||||||
|
if (InterruptController::is_initialized())
|
||||||
|
InterruptController::get().broadcast_ipi();
|
||||||
|
asm volatile("cli; 1: hlt; jmp 1b");
|
||||||
|
}
|
||||||
|
|
||||||
ASSERT(InterruptController::get().is_in_service(IRQ_TIMER));
|
ASSERT(InterruptController::get().is_in_service(IRQ_TIMER));
|
||||||
InterruptController::get().eoi(IRQ_TIMER);
|
InterruptController::get().eoi(IRQ_TIMER);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue