summaryrefslogtreecommitdiffhomepage
path: root/Private/Source
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-04-24 19:57:10 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-04-24 19:57:10 +0200
commit8153dc983802115951836f2b164af371ee6e3d73 (patch)
treeb06f35ba0d21f6d336b5be7af2a36672ea19fc43 /Private/Source
parentf7a7080d18ac2be758b242c22f020c018b1c4824 (diff)
MHR-16: Add QR-code when bootloader crashes alongside other welcomed changes.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/Source')
-rw-r--r--Private/Source/ProcessScheduler.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/Private/Source/ProcessScheduler.cxx b/Private/Source/ProcessScheduler.cxx
index 6d766d27..69236c18 100644
--- a/Private/Source/ProcessScheduler.cxx
+++ b/Private/Source/ProcessScheduler.cxx
@@ -25,8 +25,10 @@ namespace NewOS {
/// Exit Code stuff
/***********************************************************************************/
-static Int32 kExitCode = 0;
+STATIC Int32 kExitCode = 0U;
+/// @brief Gets the latest exit code.
+/// @note Not thread-safe.
const Int32 &rt_get_exit_code() noexcept { return kExitCode; }
/***********************************************************************************/
@@ -65,8 +67,8 @@ VoidPtr ProcessHeader::New(const SizeT &sz) {
/* @brief checks if runtime pointer is in region. */
bool rt_in_pool_region(VoidPtr pool_ptr, VoidPtr pool, const SizeT &sz) {
- Char *_pool_ptr = (Char *)pool_ptr;
- Char *_pool = (Char *)pool;
+ UIntPtr *_pool_ptr = (UIntPtr *)pool_ptr;
+ UIntPtr *_pool = (UIntPtr *)pool;
for (SizeT index = sz; _pool[sz] != kUserHeapMag; --index) {
if (&_pool[index] > &_pool_ptr[sz]) continue;
@@ -97,10 +99,13 @@ Boolean ProcessHeader::Delete(VoidPtr ptr, const SizeT &sz) {
return false;
}
+/// @brief process name getter.
const Char *ProcessHeader::GetName() { return this->Name; }
+/// @brief process selector getter.
const ProcessSelector &ProcessHeader::GetSelector() { return this->Selector; }
+/// @brief process status getter.
const ProcessStatus &ProcessHeader::GetStatus() { return this->Status; }
/***********************************************************************************/