mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
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.
This commit is contained in:
parent
c531084873
commit
03a9ee79fa
Notes:
sideshowbarker
2024-07-18 22:48:42 +09:00
Author: https://github.com/tomuta
Commit: 03a9ee79fa
Pull-request: https://github.com/SerenityOS/serenity/pull/5073
5 changed files with 124 additions and 58 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue