From c5c68bbd84b4b4aa87856de1f8d71a71f7b1d5cb Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 14 Feb 2021 17:39:41 +0100 Subject: [PATCH] Kernel: Mark a handful of things in Scheduler.cpp READONLY_AFTER_INIT --- Kernel/Scheduler.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Kernel/Scheduler.cpp b/Kernel/Scheduler.cpp index 620afebcae..62cadec3f7 100644 --- a/Kernel/Scheduler.cpp +++ b/Kernel/Scheduler.cpp @@ -64,10 +64,10 @@ static u32 time_slice_for(const Thread& thread) return 2; } -Thread* g_finalizer; -WaitQueue* g_finalizer_wait_queue; +READONLY_AFTER_INIT Thread* g_finalizer; +READONLY_AFTER_INIT WaitQueue* g_finalizer_wait_queue; Atomic g_finalizer_has_work { false }; -static Process* s_colonel_process; +READONLY_AFTER_INIT static Process* s_colonel_process; struct ThreadReadyQueue { IntrusiveList thread_list; @@ -75,7 +75,7 @@ struct ThreadReadyQueue { static SpinLock g_ready_queues_lock; static u32 g_ready_queues_mask; static constexpr u32 g_ready_queue_buckets = sizeof(g_ready_queues_mask) * 8; -static ThreadReadyQueue* g_ready_queues; // g_ready_queue_buckets entries +READONLY_AFTER_INIT static ThreadReadyQueue* g_ready_queues; // g_ready_queue_buckets entries static inline u32 thread_priority_to_priority_index(u32 thread_priority) {