Kernel: Remove kernel processes

Kernel can just use raw threads, pretty muchs the only thing that
process provides is syscalls which kernel threads of course don't
need.

Also this makes init process have pid 1 :D
This commit is contained in:
2025-07-01 20:05:43 +03:00
parent 892e16dfb1
commit 8a0269d29e
23 changed files with 64 additions and 85 deletions

View File

@@ -885,7 +885,10 @@ acpi_release_global_lock:
set_irq(irq);
InterruptController::get().enable_irq(irq);
Process::create_kernel([](void*) { get().acpi_event_task(); }, nullptr);
if (auto thread_or_error = Thread::create_kernel([](void*) { get().acpi_event_task(); }, nullptr); thread_or_error.is_error())
dwarnln("Failed to create ACPI thread, power button will not work: {}", thread_or_error.error());
else if (auto ret = Processor::scheduler().add_thread(thread_or_error.value()); ret.is_error())
dwarnln("Failed to create ACPI thread, power button will not work: {}", ret.error());
}
dprintln("Initialized ACPI interrupts");