mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 10:17:35 +00:00
Kernel: Add a SpinLock to the WaitQueue
We need to be able to prevent a WaitQueue from being modified by another CPU. So, add a SpinLock to it. Because this pushes some other class over the 64 byte limit, we also need to add another 128-byte bucket to the slab allocator.
This commit is contained in:
parent
788b2d64c6
commit
49f5069b76
3 changed files with 13 additions and 5 deletions
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include <AK/Atomic.h>
|
||||
#include <AK/SinglyLinkedList.h>
|
||||
#include <Kernel/SpinLock.h>
|
||||
#include <Kernel/Thread.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
@ -46,6 +47,7 @@ public:
|
|||
private:
|
||||
typedef IntrusiveList<Thread, &Thread::m_wait_queue_node> ThreadList;
|
||||
ThreadList m_threads;
|
||||
SpinLock<u32> m_lock;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue