1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 17:47:44 +00:00

Kernel: Take WorkQueue item as reference instead of pointer in do_queue

This commit is contained in:
Liav A 2022-03-09 21:26:08 +02:00 committed by Linus Groh
parent 1462211ccf
commit bf16061142
2 changed files with 5 additions and 5 deletions

View file

@ -34,7 +34,7 @@ public:
if (free_data)
free_data(data);
};
do_queue(item);
do_queue(*item);
return {};
}
@ -45,7 +45,7 @@ public:
if (!item)
return Error::from_errno(ENOMEM);
item->function = Function(function);
do_queue(item);
do_queue(*item);
return {};
}
@ -58,7 +58,7 @@ private:
Function<void()> function;
};
void do_queue(WorkItem*);
void do_queue(WorkItem&);
RefPtr<Thread> m_thread;
WaitQueue m_wait_queue;