summaryrefslogtreecommitdiffhomepage
path: root/Private/Source/ProcessManager.cxx
diff options
context:
space:
mode:
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;