mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +00:00
Kernel: Add simplistic work queues
We can't use deferred functions for anything that may require preemption, such as copying from/to user or accessing the disk. For those purposes we should use a work queue, which is essentially a kernel thread that may be preempted or blocked.
This commit is contained in:
parent
314f04b896
commit
20cccda731
7 changed files with 182 additions and 1 deletions
|
@ -72,6 +72,7 @@
|
|||
#include <Kernel/Tasks/SyncTask.h>
|
||||
#include <Kernel/Time/TimeManagement.h>
|
||||
#include <Kernel/VM/MemoryManager.h>
|
||||
#include <Kernel/WorkQueue.h>
|
||||
#include <Kernel/kstdio.h>
|
||||
|
||||
// Defined in the linker script
|
||||
|
@ -189,6 +190,8 @@ extern "C" UNMAP_AFTER_INIT [[noreturn]] void init()
|
|||
Process::initialize();
|
||||
Scheduler::initialize();
|
||||
|
||||
WorkQueue::initialize();
|
||||
|
||||
{
|
||||
RefPtr<Thread> init_stage2_thread;
|
||||
Process::create_kernel_process(init_stage2_thread, "init_stage2", init_stage2, nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue