summaryrefslogtreecommitdiff
path: root/Kernel/WaitQueue.h
blob: ebe46702bf6508a74b478ec4bb47c1cf78605a11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#pragma once

#include <AK/SinglyLinkedList.h>
#include <Kernel/Thread.h>

class WaitQueue {
public:
    WaitQueue();
    ~WaitQueue();

    void enqueue(Thread&);
    void wake_one();
    void wake_all();

private:
    typedef IntrusiveList<Thread, &Thread::m_wait_queue_node> ThreadList;
    ThreadList m_threads;
};