Use correct instruction

This commit is contained in:
Alex 2023-02-18 04:11:59 +02:00
parent 476e97baf1
commit 0fb62e52d2
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
5 changed files with 8 additions and 9 deletions

View File

@ -74,8 +74,8 @@ namespace Memory
}
error("Out of memory! (Free: %ldMB; Used: %ldMB; Reserved: %ldMB)", TO_MB(FreeMemory), TO_MB(UsedMemory), TO_MB(ReservedMemory));
CPU::Halt(true);
return nullptr;
CPU::Stop();
__builtin_unreachable();
}
void *Physical::RequestPages(size_t Count)

View File

@ -47,8 +47,7 @@ namespace Execute
TaskManager->Sleep(100);
goto RetryIPCWrite;
}
while (1)
;
CPU::Halt(true);
}
PCB *InterpreterTargetProcess;

View File

@ -182,7 +182,7 @@ namespace GraphicalUserInterface
else
{
if (unlikely(Idle > 1000))
CPU::Halt();
CPU::Pause();
else
Idle++;
}

View File

@ -280,7 +280,7 @@ EXTERNC __no_instrument_function void Main(BootInfo *Info)
if (dev->node->Flags != NodeFlags::DIRECTORY)
{
KPrint("\eE85230/system/dev is not a directory! Halting...");
CPU::Halt(true);
CPU::Stop();
}
vfs->Close(dev);
DevFS = dev->node;
@ -294,7 +294,7 @@ EXTERNC __no_instrument_function void Main(BootInfo *Info)
if (mnt->node->Flags != NodeFlags::DIRECTORY)
{
KPrint("\eE85230/system/mnt is not a directory! Halting...");
CPU::Halt(true);
CPU::Stop();
}
vfs->Close(mnt);
MntFS = mnt->node;
@ -308,7 +308,7 @@ EXTERNC __no_instrument_function void Main(BootInfo *Info)
if (proc->node->Flags != NodeFlags::DIRECTORY)
{
KPrint("\eE85230/system/proc is not a directory! Halting...");
CPU::Halt(true);
CPU::Stop();
}
vfs->Close(proc);
ProcFS = proc->node;

View File

@ -170,7 +170,7 @@ namespace InterProcessCommunication
warn("Interrupts are disabled. This may cause a kernel hang.");
debug("Waiting for IPC %d (now %s)", ID, Hnd->Listening ? "listening" : "ready");
while (Hnd->Listening)
CPU::Halt();
CPU::Pause();
debug("IPC %d is ready", ID);
return IPCSuccess;
}