mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Do not stop the scheduler at the beginning of the crash handler
This commit is contained in:
parent
c2628019b7
commit
89f5d29135
@ -291,8 +291,6 @@ namespace CrashHandler
|
||||
// TODO: SUPPORT SMP
|
||||
CPU::Interrupts(CPU::Disable);
|
||||
error("An exception occurred!");
|
||||
if (TaskManager)
|
||||
TaskManager->Panic();
|
||||
SBIdx = 255;
|
||||
CHArchTrapFrame *Frame = (CHArchTrapFrame *)Data;
|
||||
#if defined(__amd64__)
|
||||
@ -301,6 +299,8 @@ namespace CrashHandler
|
||||
if (Frame->cs != GDT_USER_CODE && Frame->cs != GDT_USER_DATA)
|
||||
{
|
||||
debug("Exception in kernel mode");
|
||||
if (TaskManager)
|
||||
TaskManager->Panic();
|
||||
Display->CreateBuffer(0, 0, SBIdx);
|
||||
}
|
||||
else
|
||||
@ -320,17 +320,8 @@ namespace CrashHandler
|
||||
if (data->CurrentThread)
|
||||
{
|
||||
debug("Current thread is valid %#lx", data->CurrentThread);
|
||||
if (!data->CurrentThread->Security.IsCritical)
|
||||
{
|
||||
debug("Current thread is not critical");
|
||||
UserModeExceptionHandler(Frame);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Display->CreateBuffer(0, 0, SBIdx);
|
||||
EHPrint("\eFF0000Init process crashed!");
|
||||
}
|
||||
UserModeExceptionHandler(Frame);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ void KernelMainThread()
|
||||
KPrint("\eE85230Userspace process exited with code %d", ret.Thread->GetExitCode());
|
||||
error("Userspace process exited with code %d (%#x)", ret.Thread->GetExitCode(), ret.Thread->GetExitCode());
|
||||
Exit:
|
||||
KPrint("Well, that's it. I'm going to sleep now.");
|
||||
KPrint("Well, this is awkward. I guess you'll have to reboot.");
|
||||
CPU::Halt(true);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user