diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-28 19:29:01 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-28 19:29:42 +0100 |
| commit | f06d0703a5813841f5a6dacd294c5cfbe9394037 (patch) | |
| tree | b6626ef96cd0fe290e889054c8a934e04d556eef /Private/Source/ProcessManager.cxx | |
| parent | 4a789fd64c44e38ed0c3d9fb597e62afd17a337d (diff) | |
Kernel: Update SPECIFICATION.TXT, Implement Shared objects primitives.
Kernel: Working on EFI reimplementation.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/Source/ProcessManager.cxx')
| -rw-r--r-- | Private/Source/ProcessManager.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Private/Source/ProcessManager.cxx b/Private/Source/ProcessManager.cxx index 4679daff..664a1c7c 100644 --- a/Private/Source/ProcessManager.cxx +++ b/Private/Source/ProcessManager.cxx @@ -25,6 +25,10 @@ namespace hCore { +/***********************************************************************************/ +/// Exit Code stuff +/***********************************************************************************/ + static Int32 kExitCode = 0; const Int32 &rt_get_exit_code() noexcept @@ -32,9 +36,11 @@ const Int32 &rt_get_exit_code() noexcept return kExitCode; } +/***********************************************************************************/ + void Process::Crash() { - kcout << this->Name << ": Crashed."; + kcout << this->Name << ": Crashed\n"; this->Exit(-1); } @@ -43,6 +49,8 @@ void Process::Wake(const bool should_wakeup) this->Status = should_wakeup ? ProcessStatus::kRunning : ProcessStatus::kFrozen; } +/***********************************************************************************/ + VoidPtr Process::New(const SizeT &sz) { if (this->FreeMemory < 1) @@ -65,6 +73,8 @@ VoidPtr Process::New(const SizeT &sz) return nullptr; } +/***********************************************************************************/ + /* @brief checks if runtime pointer is in region. */ bool rt_in_pool_region(VoidPtr pool_ptr, VoidPtr pool, const SizeT &sz) { @@ -122,6 +132,8 @@ const ProcessStatus &Process::GetStatus() return this->Status; } +/***********************************************************************************/ + /** @brief Affinity is the time slot allowed for the process. */ |
