mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
Kernel: Simplify Process factory functions
- Instead of taking the first new thread as an out-parameter, we now bundle the process and its first thread in a struct and use that as the return value. - Make all Process factory functions return ErrorOr. Use this to convert some places to more TRY(). - Drop the "try_" prefix on Process factory functions.
This commit is contained in:
@@ -28,10 +28,8 @@ static void finalizer_task(void*)
|
||||
|
||||
UNMAP_AFTER_INIT void FinalizerTask::spawn()
|
||||
{
|
||||
LockRefPtr<Thread> finalizer_thread;
|
||||
auto finalizer_process = Process::create_kernel_process(finalizer_thread, KString::must_create(finalizer_task_name), finalizer_task, nullptr);
|
||||
VERIFY(finalizer_process);
|
||||
g_finalizer = finalizer_thread;
|
||||
auto [_, finalizer_thread] = MUST(Process::create_kernel_process(KString::must_create(finalizer_task_name), finalizer_task, nullptr));
|
||||
g_finalizer = move(finalizer_thread);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user