diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-06-28 08:26:19 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-06-28 08:26:19 +0200 |
| commit | c142fe6fda7d09e929c9706b444cdc13ed5e72f3 (patch) | |
| tree | f42890096937271233da33d9c201043fb9960634 /Kernel/Sources/ProcessScheduler.cxx | |
| parent | e32c206fe1d17eb96339b280c7f061e7201bd15b (diff) | |
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 <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Kernel/Sources/ProcessScheduler.cxx')
| -rw-r--r-- | Kernel/Sources/ProcessScheduler.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
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) |
