1
Fork 0
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:
Andreas Kling 2019-12-22 12:23:44 +01:00
parent 96cfddb3ac
commit f4978b2be1
4 changed files with 30 additions and 26 deletions

View file

@ -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;
};