mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +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
5 changed files with 124 additions and 58 deletions
|
@ -758,11 +758,6 @@ inline const LogStream& operator<<(const LogStream& stream, const Process& proce
|
|||
return stream << process.name() << '(' << process.pid().value() << ')';
|
||||
}
|
||||
|
||||
inline u32 Thread::effective_priority() const
|
||||
{
|
||||
return m_priority + m_extra_priority;
|
||||
}
|
||||
|
||||
#define REQUIRE_NO_PROMISES \
|
||||
do { \
|
||||
if (Process::current()->has_promises()) { \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue