diff options
| author | Amlal <amlal@zka.com> | 2024-07-21 09:48:52 +0200 |
|---|---|---|
| committer | Amlal <amlal@zka.com> | 2024-07-21 09:48:52 +0200 |
| commit | ea937555b04ae7f39785341e45955b48515e5bf1 (patch) | |
| tree | 9d865f6eeba5cc395e6cdaa5b1e6fdcf58361b0f /Kernel/Sources | |
| parent | 650fee520f526d9cd5ffa75735bd94d5140dd247 (diff) | |
[IMP] MHR-36: Much better ref class
Signed-off-by: Amlal <amlal@zka.com>
Diffstat (limited to 'Kernel/Sources')
| -rw-r--r-- | Kernel/Sources/GUIDWizard.cxx | 2 | ||||
| -rw-r--r-- | Kernel/Sources/ProcessScheduler.cxx | 8 | ||||
| -rw-r--r-- | Kernel/Sources/Ref.cxx | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/Kernel/Sources/GUIDWizard.cxx b/Kernel/Sources/GUIDWizard.cxx index be7ad627..71488096 100644 --- a/Kernel/Sources/GUIDWizard.cxx +++ b/Kernel/Sources/GUIDWizard.cxx @@ -10,7 +10,7 @@ ------------------------------------------- */ #include <CFKit/GUIDWizard.hpp> -#include <NewKit/Ref.hpp> +#include <NewKit/Ref.hxx> // begin of ascii 'readable' characters. (A, C, C, 1, 2) #define kAsciiBegin 47 diff --git a/Kernel/Sources/ProcessScheduler.cxx b/Kernel/Sources/ProcessScheduler.cxx index 34bc321d..b3e79c97 100644 --- a/Kernel/Sources/ProcessScheduler.cxx +++ b/Kernel/Sources/ProcessScheduler.cxx @@ -301,12 +301,14 @@ namespace Kernel return mTeam; } + /// @internal + STATIC Ref<ProcessScheduler> cSchedulerRef; + /// @brief Shared instance of the process scheduler. /// @return - Ref<ProcessScheduler&> ProcessScheduler::The() + Ref<ProcessScheduler>& ProcessScheduler::The() { - static ProcessScheduler ref; - return {ref}; + return cSchedulerRef; } /// @brief Gets current running process. diff --git a/Kernel/Sources/Ref.cxx b/Kernel/Sources/Ref.cxx index d9eb039a..b92ceac4 100644 --- a/Kernel/Sources/Ref.cxx +++ b/Kernel/Sources/Ref.cxx @@ -4,4 +4,4 @@ ------------------------------------------- */ -#include <NewKit/Ref.hpp> +#include <NewKit/Ref.hxx> |
