mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:27:45 +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 <AK/IntrusiveList.h>
|
||||||
#include <Kernel/Forward.h>
|
#include <Kernel/Forward.h>
|
||||||
|
#include <Kernel/Heap/SlabAllocator.h>
|
||||||
#include <Kernel/Locking/SpinlockProtected.h>
|
#include <Kernel/Locking/SpinlockProtected.h>
|
||||||
|
|
||||||
namespace Kernel {
|
namespace Kernel {
|
||||||
|
@ -45,6 +46,9 @@ private:
|
||||||
explicit WorkQueue(StringView);
|
explicit WorkQueue(StringView);
|
||||||
|
|
||||||
struct WorkItem {
|
struct WorkItem {
|
||||||
|
MAKE_SLAB_ALLOCATED(WorkItem);
|
||||||
|
|
||||||
|
public:
|
||||||
IntrusiveListNode<WorkItem> m_node;
|
IntrusiveListNode<WorkItem> m_node;
|
||||||
Function<void()> function;
|
Function<void()> function;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue