mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:58:11 +00:00
Kernel: Use SpinlockProtected<T> in WorkQueue
This commit is contained in:
parent
b443e9e1a9
commit
44b273f3ac
2 changed files with 11 additions and 12 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, the SerenityOS developers.
|
||||
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -8,6 +9,7 @@
|
|||
|
||||
#include <AK/IntrusiveList.h>
|
||||
#include <Kernel/Forward.h>
|
||||
#include <Kernel/Locking/SpinlockProtected.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
|
@ -51,8 +53,7 @@ private:
|
|||
|
||||
RefPtr<Thread> m_thread;
|
||||
WaitQueue m_wait_queue;
|
||||
IntrusiveList<&WorkItem::m_node> m_items;
|
||||
Spinlock m_lock;
|
||||
SpinlockProtected<IntrusiveList<&WorkItem::m_node>> m_items;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue