summaryrefslogtreecommitdiffhomepage
path: root/Kernel/Sources/ProcessScheduler.cxx
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-06-29 13:15:29 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-06-29 13:15:29 +0200
commitd9d42bcfeb444652ae198a6bd3481ce316549e55 (patch)
tree238e88d868855c4ab6e1c6671bfc18a9930048fe /Kernel/Sources/ProcessScheduler.cxx
parentf562fbf39333925689d6fb704af15efe5f99ed28 (diff)
kernel: Use local error codes for kernel calls. So that we know which
process caused the error, and it's not global as well. Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Kernel/Sources/ProcessScheduler.cxx')
-rw-r--r--Kernel/Sources/ProcessScheduler.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/Kernel/Sources/ProcessScheduler.cxx b/Kernel/Sources/ProcessScheduler.cxx
index ca9a3435..ddeff7f2 100644
--- a/Kernel/Sources/ProcessScheduler.cxx
+++ b/Kernel/Sources/ProcessScheduler.cxx
@@ -55,6 +55,8 @@ namespace NewOS
this->Exit(kErrorProcessFault);
}
+ Int32& ProcessHeader::GetLocalCode() noexcept { return fLocalCode; }
+
void ProcessHeader::Wake(const bool should_wakeup)
{
this->Status =
@@ -69,7 +71,7 @@ namespace NewOS
{
if (this->FreeMemory < 1)
{
- DbgLastError() = kErrorHeapOutOfMemory;
+ ErrLocal() = kErrorHeapOutOfMemory;
/* we're going out of memory */
this->Crash();
@@ -134,19 +136,19 @@ namespace NewOS
}
/// @brief process name getter.
- const Char* ProcessHeader::GetName()
+ const Char* ProcessHeader::GetName() noexcept
{
return this->Name;
}
/// @brief process selector getter.
- const ProcessSelector& ProcessHeader::GetSelector()
+ const ProcessSelector& ProcessHeader::GetSelector() noexcept
{
return this->Selector;
}
/// @brief process status getter.
- const ProcessStatus& ProcessHeader::GetStatus()
+ const ProcessStatus& ProcessHeader::GetStatus() noexcept
{
return this->Status;
}
@@ -156,7 +158,7 @@ namespace NewOS
/**
@brief Affinity is the time slot allowed for the process.
*/
- const AffinityKind& ProcessHeader::GetAffinity()
+ const AffinityKind& ProcessHeader::GetAffinity() noexcept
{
return this->Affinity;
}