1
Fork 0
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:
Andreas Kling 2021-10-26 10:50:44 +02:00
parent 44b273f3ac
commit e0f0b6379a

View file

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