From eea552909be6c377a7e62d7679846248cb2e1fef Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 28 Aug 2024 16:43:23 +0200 Subject: [FIX] Use cLastExitCode as unsigned variable, refactored the code to match the changes. Signed-off-by: Amlal El Mahrouss --- dev/ZKA/KernelKit/ProcessScheduler.hxx | 6 +++--- dev/ZKA/Sources/ProcessScheduler.cxx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'dev') diff --git a/dev/ZKA/KernelKit/ProcessScheduler.hxx b/dev/ZKA/KernelKit/ProcessScheduler.hxx index 1f70158b..b25e0efc 100644 --- a/dev/ZKA/KernelKit/ProcessScheduler.hxx +++ b/dev/ZKA/KernelKit/ProcessScheduler.hxx @@ -141,7 +141,7 @@ namespace Kernel public: void SetEntrypoint(UIntPtr& imageStart) noexcept; - const Int32& GetExitCode() noexcept; + const UInt32& GetExitCode() noexcept; public: Char Name[kProcessLen] = {"PROCESS #0 (TEAM 0)"}; @@ -216,7 +216,7 @@ namespace Kernel const AffinityKind& GetAffinity() noexcept; private: - Int32 fLastExitCode{0}; + UInt32 fLastExitCode{0}; Int32 fLocalCode{0}; friend ProcessScheduler; @@ -290,7 +290,7 @@ namespace Kernel STATIC SizeT StartScheduling(); }; - const Int32& sched_get_exit_code(void) noexcept; + const UInt32& sched_get_exit_code(void) noexcept; } // namespace Kernel #include diff --git a/dev/ZKA/Sources/ProcessScheduler.cxx b/dev/ZKA/Sources/ProcessScheduler.cxx index db11b4e9..2198cd42 100644 --- a/dev/ZKA/Sources/ProcessScheduler.cxx +++ b/dev/ZKA/Sources/ProcessScheduler.cxx @@ -28,7 +28,7 @@ namespace Kernel /// @brief Exit Code global variable. /***********************************************************************************/ - Int32 cLastExitCode = 0U; + UInt32 cLastExitCode = 0U; /// @brief The main process object. ProcessScheduler* cProcessScheduler = nullptr; @@ -36,7 +36,7 @@ namespace Kernel /// @brief Gets the last exit code. /// @note Not thread-safe. /// @return Int32 the last exit code. - const Int32& sched_get_exit_code(void) noexcept + const UInt32& sched_get_exit_code(void) noexcept { return cLastExitCode; } @@ -60,7 +60,7 @@ namespace Kernel /// @brief Gets the local last exit code. /// @note Not thread-safe. /// @return Int32 the last exit code. - const Int32& PROCESS_HEADER_BLOCK::GetExitCode() noexcept + const UInt32& PROCESS_HEADER_BLOCK::GetExitCode() noexcept { return this->fLastExitCode; } -- cgit v1.2.3