From d2b31db9d2c9a70592ebed05cd73352f9b9d194b Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 2 May 2024 00:34:04 +0200 Subject: 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 --- Private/Source/ProcessScheduler.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Private/Source/ProcessScheduler.cxx') 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 @@ -15,7 +15,7 @@ #include #include -///! 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); -- cgit v1.2.3