mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Update KThread.cpp
This commit is contained in:
parent
0ee2230ca9
commit
6ce03ff0ed
@ -81,12 +81,12 @@ void KernelMainThread()
|
|||||||
|
|
||||||
// TODO: Untested!
|
// TODO: Untested!
|
||||||
Execute::SpawnData ret = Execute::Spawn(Config.InitPath, argc, (uint64_t)argv.data());
|
Execute::SpawnData ret = Execute::Spawn(Config.InitPath, argc, (uint64_t)argv.data());
|
||||||
ret.Thread->SetCritical(true);
|
|
||||||
if (ret.Status != Execute::ExStatus::OK)
|
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);
|
CPU::Halt(true);
|
||||||
}
|
}
|
||||||
|
ret.Thread->SetCritical(true);
|
||||||
TaskManager->WaitForThread(ret.Thread);
|
TaskManager->WaitForThread(ret.Thread);
|
||||||
KPrint("\eE85230Userspace process exited with code %d", ret.Thread->GetExitCode());
|
KPrint("\eE85230Userspace process exited with code %d", ret.Thread->GetExitCode());
|
||||||
error("Userspace process exited with code %d (%#x)", ret.Thread->GetExitCode(), ret.Thread->GetExitCode());
|
error("Userspace process exited with code %d (%#x)", ret.Thread->GetExitCode(), ret.Thread->GetExitCode());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user