diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-05-02 00:34:04 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-05-02 00:34:27 +0200 |
| commit | d2b31db9d2c9a70592ebed05cd73352f9b9d194b (patch) | |
| tree | 67eb150d26f88335cc21403352bd8ddb89f247c1 /Private/Source/ProcessScheduler.cxx | |
| parent | 91fbaf05d24a89c3c77a8cbe7a26e27615b85e88 (diff) | |
kernel: see below.
- Fix a bug with fork allocation and their uniqueness.
- Improve preemptive scheduler code.
- Auto-create directories when they are missing, with their metadata.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/Source/ProcessScheduler.cxx')
| -rw-r--r-- | Private/Source/ProcessScheduler.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Private/Source/ProcessScheduler.cxx b/Private/Source/ProcessScheduler.cxx index a21e7dd4..5ac253cb 100644 --- a/Private/Source/ProcessScheduler.cxx +++ b/Private/Source/ProcessScheduler.cxx @@ -6,7 +6,7 @@ /***********************************************************************************/ /// @file ProcessScheduler.cxx -/// @brief Process scheduler. +/// @brief MicroKernel process scheduler. /***********************************************************************************/ #include <KernelKit/ProcessScheduler.hpp> @@ -15,7 +15,7 @@ #include <NewKit/String.hpp> #include <KernelKit/HError.hpp> -///! bugs = 0 +///! BUGS: 0 /***********************************************************************************/ /* This file handles the process scheduling. @@ -23,14 +23,14 @@ namespace NewOS { /***********************************************************************************/ -/// Exit Code stuff +/// @brief Exit Code global /***********************************************************************************/ -STATIC Int32 kExitCode = 0U; +STATIC Int32 kLastExitCode = 0U; /// @brief Gets the latest exit code. /// @note Not thread-safe. -const Int32 &rt_get_exit_code() noexcept { return kExitCode; } +const Int32 &rt_get_exit_code() noexcept { return kLastExitCode; } /***********************************************************************************/ @@ -133,7 +133,7 @@ void ProcessHeader::Exit(Int32 exit_code) { ProcessScheduler::Shared().Leak().GetCurrent().Leak().Ring > 0) ke_stop(RUNTIME_CHECK_PROCESS); - kExitCode = exit_code; + kLastExitCode = exit_code; if (this->Ring != (Int32)ProcessSelector::kRingDriver) { if (this->HeapPtr) rt_free_heap(this->HeapPtr); |
