summaryrefslogtreecommitdiffhomepage
path: root/Private/Source/ProcessManager.cxx
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-28 16:26:33 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-28 16:26:33 +0100
commit06be6d65bb71152be8a28d7bb6b1028b5a588654 (patch)
treeb47625ad70e5ec6093187f9d454f4edeaffb5ed1 /Private/Source/ProcessManager.cxx
parentf69bd40d5d97e371451d2e9c27721422141d828f (diff)
NewKernel: Final things are getting done for the first prototype.
NewBoot: Add ARM64 to HEL. SPEC: Update it to include NewFS into it. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/Source/ProcessManager.cxx')
-rw-r--r--Private/Source/ProcessManager.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/Private/Source/ProcessManager.cxx b/Private/Source/ProcessManager.cxx
index 5dcc98f2..4679daff 100644
--- a/Private/Source/ProcessManager.cxx
+++ b/Private/Source/ProcessManager.cxx
@@ -7,6 +7,7 @@
* ========================================================
*/
+#include "NewKit/Panic.hpp"
#include <KernelKit/ProcessManager.hpp>
#include <KernelKit/SMPManager.hpp>
#include <NewKit/KHeap.hpp>
@@ -121,19 +122,25 @@ const ProcessStatus &Process::GetStatus()
return this->Status;
}
+/**
+@brief Affinity is the time slot allowed for the process.
+*/
const AffinityKind &Process::GetAffinity()
{
return this->Affinity;
}
+/**
+@brief Standard exit proc.
+*/
void Process::Exit(Int32 exit_code)
{
if (this->ProcessId != ProcessManager::Shared().Leak().GetCurrent().Leak().ProcessId)
- return;
+ panic(RUNTIME_CHECK_PROCESS);
if (this->Ring == (Int32)ProcessSelector::kRingKernel &&
ProcessManager::Shared().Leak().GetCurrent().Leak().Ring > 0)
- return;
+ panic(RUNTIME_CHECK_PROCESS);
kExitCode = exit_code;
@@ -200,6 +207,7 @@ SizeT ProcessManager::Run() noexcept
for (; processIndex < this->m_Headers.Count(); ++processIndex)
{
auto process = this->m_Headers[processIndex];
+
MUST_PASS(
process); //! no need for a MUST_PASS(process.Leak());, it is recursive because of the nature of the class;