diff options
author | Tom <tomut@yahoo.com> | 2021-01-22 16:56:08 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-27 22:48:41 +0100 |
commit | 03a9ee79faf0ba42776492f027154b6156d0085c (patch) | |
tree | cf95fc69d081ce9811bbdd2fe87c3ab5f714ede2 /Kernel/Scheduler.h | |
parent | c53108487331a579a3be9b43ec60d6e73cee26ed (diff) | |
download | serenity-03a9ee79faf0ba42776492f027154b6156d0085c.zip |
Kernel: Implement thread priority queues
Rather than walking all Thread instances and putting them into
a vector to be sorted by priority, queue them into priority sorted
linked lists as soon as they become ready to be executed.
Diffstat (limited to 'Kernel/Scheduler.h')
-rw-r--r-- | Kernel/Scheduler.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Kernel/Scheduler.h b/Kernel/Scheduler.h index 5ea17c4c25..08b8d8f79c 100644 --- a/Kernel/Scheduler.h +++ b/Kernel/Scheduler.h @@ -70,6 +70,9 @@ public: static void idle_loop(void*); static void invoke_async(); static void notify_finalizer(); + static Thread& pull_next_runnable_thread(); + static bool dequeue_runnable_thread(Thread&, bool = false); + static void queue_runnable_thread(Thread&); template<typename Callback> static inline IterationDecision for_each_runnable(Callback); |