Kernel: Release debug lock if its locked during kernel panic

Also kernel panic now prints if it had lock
This commit is contained in:
2024-09-18 00:56:02 +03:00
parent f7e549e412
commit 999eb53364
2 changed files with 6 additions and 0 deletions

View File

@@ -360,6 +360,8 @@ done:
{
if (g_paniced)
{
while (Debug::s_debug_lock.current_processor_has_lock())
Debug::s_debug_lock.unlock(InterruptState::Disabled);
dprintln("Processor {} halted", Processor::current_id());
if (InterruptController::is_initialized())
InterruptController::get().broadcast_ipi();