From c142fe6fda7d09e929c9706b444cdc13ed5e72f3 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Fri, 28 Jun 2024 08:26:19 +0200 Subject: IMP: Feature Pack #1 - Process scheduler. - System calls. - ACPI support. - Driver kit. - Filesystem support. - Program loader. - newstd/herror APIs. Signed-off-by: Amlal EL Mahrouss --- Kernel/Sources/ProcessScheduler.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'Kernel/Sources/ProcessScheduler.cxx') diff --git a/Kernel/Sources/ProcessScheduler.cxx b/Kernel/Sources/ProcessScheduler.cxx index 315dc07a..ca9a3435 100644 --- a/Kernel/Sources/ProcessScheduler.cxx +++ b/Kernel/Sources/ProcessScheduler.cxx @@ -27,13 +27,19 @@ namespace NewOS /// @brief Exit Code global /***********************************************************************************/ - STATIC Int32 kLastExitCode = 0U; + STATIC Int32 cLastExitCode = 0U; /// @brief Gets the latest exit code. /// @note Not thread-safe. + /// @return Int32 the last exit code. + const Int32& ProcessHeader::GetExitCode() noexcept + { + return fLastExitCode; + } + const Int32& rt_get_exit_code() noexcept { - return kLastExitCode; + return cLastExitCode; } /***********************************************************************************/ @@ -164,7 +170,8 @@ namespace NewOS ProcessScheduler::The().Leak().TheCurrent().Leak().ProcessId) ke_stop(RUNTIME_CHECK_PROCESS); - kLastExitCode = exit_code; + fLastExitCode = exit_code; + cLastExitCode = exit_code; //! Delete image if not done already. if (this->Image) -- cgit v1.2.3