mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 01:37:39 +03:00
Kernel: Use KResultOr::release_value in Process::create_kernel_thread
This should avoid an unneccessary reference bump.
This commit is contained in:
parent
f74e31c74d
commit
b22740c08e
Notes:
sideshowbarker
2024-07-18 22:31:48 +09:00
Author: https://github.com/tomuta Commit: https://github.com/SerenityOS/serenity/commit/b22740c08ec Pull-request: https://github.com/SerenityOS/serenity/pull/5260
@ -811,7 +811,7 @@ RefPtr<Thread> Process::create_kernel_thread(void (*entry)(void*), void* entry_d
|
||||
if (thread_or_error.is_error())
|
||||
return {};
|
||||
|
||||
auto& thread = thread_or_error.value();
|
||||
auto thread = thread_or_error.release_value();
|
||||
thread->set_name(name);
|
||||
thread->set_affinity(affinity);
|
||||
thread->set_priority(priority);
|
||||
|
Loading…
Reference in New Issue
Block a user