mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
Kernel: Use IntrusiveList to make WaitQueue allocation-free :^)
This commit is contained in:
parent
96cfddb3ac
commit
f4978b2be1
4 changed files with 30 additions and 26 deletions
|
@ -1,8 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/SinglyLinkedList.h>
|
||||
|
||||
class Thread;
|
||||
#include <Kernel/Thread.h>
|
||||
|
||||
class WaitQueue {
|
||||
public:
|
||||
|
@ -14,5 +13,6 @@ public:
|
|||
void wake_all();
|
||||
|
||||
private:
|
||||
SinglyLinkedList<Thread*> m_threads;
|
||||
typedef IntrusiveList<Thread, &Thread::m_wait_queue_node> ThreadList;
|
||||
ThreadList m_threads;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue