Update KThread.cpp

This commit is contained in:
Alex 2022-11-07 03:16:43 +02:00
parent 0ee2230ca9
commit 6ce03ff0ed
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -81,12 +81,12 @@ void KernelMainThread()
// TODO: Untested!
Execute::SpawnData ret = Execute::Spawn(Config.InitPath, argc, (uint64_t)argv.data());
ret.Thread->SetCritical(true);
if (ret.Status != Execute::ExStatus::OK)
{
KPrint("\eE85230Failed to start %s! Code: %d", Config.InitPath, ret);
KPrint("\eE85230Failed to start %s! Code: %d", Config.InitPath, ret.Status);
CPU::Halt(true);
}
ret.Thread->SetCritical(true);
TaskManager->WaitForThread(ret.Thread);
KPrint("\eE85230Userspace process exited with code %d", ret.Thread->GetExitCode());
error("Userspace process exited with code %d (%#x)", ret.Thread->GetExitCode(), ret.Thread->GetExitCode());