From 4d192e629a07ae457134cb0063e0136e54b01008 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 9 Dec 2025 02:50:07 +0100 Subject: chore: Codebase improvements and tweaks. Signed-off-by: Amlal El Mahrouss --- src/kernel/KernelKit/CoreProcessScheduler.h | 52 ++++++++++++++--------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'src/kernel/KernelKit/CoreProcessScheduler.h') diff --git a/src/kernel/KernelKit/CoreProcessScheduler.h b/src/kernel/KernelKit/CoreProcessScheduler.h index da89b112..5071f85d 100644 --- a/src/kernel/KernelKit/CoreProcessScheduler.h +++ b/src/kernel/KernelKit/CoreProcessScheduler.h @@ -26,22 +26,22 @@ EXTERN_C void sched_idle_task(void); namespace Kernel { -class USER_PROCESS; -class KERNEL_TASK; +class UserProcess; +class KernelTask; class KernelTaskScheduler; class UserProcessScheduler; class UserProcessTeam; template -struct PROCESS_HEAP_TREE; +struct ProcessHeapTree; template -struct PROCESS_SPECIAL_TREE; +struct ProcessSpecialTree; template -struct PROCESS_FILE_TREE; +struct ProcessFileTree; -enum { +enum struct TreeKind : UInt32 { kInvalidTreeKind = 0U, kRedTreeKind = 100U, kBlackTreeKind = 101U, @@ -49,7 +49,7 @@ enum { }; template -struct PROCESS_HEAP_TREE { +struct ProcessHeapTree { static constexpr auto kHeap = true; static constexpr auto kFile = false; static constexpr auto kSpecial = false; @@ -58,25 +58,25 @@ struct PROCESS_HEAP_TREE { SizeT EntrySize{0UL}; SizeT EntryPad{0UL}; - UInt32 Color{kBlackTreeKind}; + TreeKind Color{TreeKind::kBlackTreeKind}; - struct PROCESS_HEAP_TREE* Parent { + struct ProcessHeapTree* Parent { nullptr }; - struct PROCESS_HEAP_TREE* Child { + struct ProcessHeapTree* Child { nullptr }; - struct PROCESS_HEAP_TREE* Prev { + struct ProcessHeapTree* Prev { nullptr }; - struct PROCESS_HEAP_TREE* Next { + struct ProcessHeapTree* Next { nullptr }; }; template -struct PROCESS_FILE_TREE { +struct ProcessFileTree { static constexpr auto kHeap = false; static constexpr auto kFile = true; static constexpr auto kSpecial = false; @@ -85,21 +85,21 @@ struct PROCESS_FILE_TREE { SizeT EntrySize{0UL}; SizeT EntryPad{0UL}; - UInt32 Color{kBlackTreeKind}; + TreeKind Color{TreeKind::kBlackTreeKind}; - struct PROCESS_FILE_TREE* Parent { + struct ProcessFileTree* Parent { nullptr }; - struct PROCESS_FILE_TREE* Child { + struct ProcessFileTree* Child { nullptr }; - struct PROCESS_FILE_TREE* Prev { + struct ProcessFileTree* Prev { nullptr }; - struct PROCESS_FILE_TREE* Next { + struct ProcessFileTree* Next { nullptr }; }; @@ -107,7 +107,7 @@ struct PROCESS_FILE_TREE { using ProcessCtx = UInt32; template -struct PROCESS_SPECIAL_TREE { +struct ProcessSpecialTree { static constexpr auto kHeap = false; static constexpr auto kFile = false; static constexpr auto kSpecial = true; @@ -119,21 +119,21 @@ struct PROCESS_SPECIAL_TREE { /// @brief a context is where the resource comes from. ProcessCtx EntryContext{0UL}; // could be a socket, printer, device... - UInt32 Color{kBlackTreeKind}; + TreeKind Color{TreeKind::kBlackTreeKind}; - struct PROCESS_SPECIAL_TREE* Parent { + struct ProcessSpecialTree* Parent { nullptr }; - struct PROCESS_SPECIAL_TREE* Child { + struct ProcessSpecialTree* Child { nullptr }; - struct PROCESS_SPECIAL_TREE* Prev { + struct ProcessSpecialTree* Prev { nullptr }; - struct PROCESS_SPECIAL_TREE* Next { + struct ProcessSpecialTree* Next { nullptr }; }; @@ -240,8 +240,8 @@ struct ProcessImage final { explicit ProcessImage() = default; private: - friend USER_PROCESS; - friend KERNEL_TASK; + friend UserProcess; + friend KernelTask; friend UserProcessScheduler; friend KernelTaskScheduler; -- cgit v1.2.3