mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
Kernel: Make WorkQueue::WorkItem slab allocated
This commit is contained in:
parent
44b273f3ac
commit
e0f0b6379a
1 changed files with 4 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <AK/IntrusiveList.h>
|
||||
#include <Kernel/Forward.h>
|
||||
#include <Kernel/Heap/SlabAllocator.h>
|
||||
#include <Kernel/Locking/SpinlockProtected.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
@ -45,6 +46,9 @@ private:
|
|||
explicit WorkQueue(StringView);
|
||||
|
||||
struct WorkItem {
|
||||
MAKE_SLAB_ALLOCATED(WorkItem);
|
||||
|
||||
public:
|
||||
IntrusiveListNode<WorkItem> m_node;
|
||||
Function<void()> function;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue