diff options
author | Andreas Kling <kling@serenityos.org> | 2021-04-23 16:46:57 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-23 16:46:57 +0200 |
commit | b91c49364df1683c7fe1191eb02b8d9c331874f6 (patch) | |
tree | a9ea5ff8e4cc8cfcfe75c279551be35793d0ffb3 /Kernel/Process.cpp | |
parent | b3db01e20eeae632cc75df9af8666772bda67091 (diff) | |
download | serenity-b91c49364df1683c7fe1191eb02b8d9c331874f6.zip |
AK: Rename adopt() to adopt_ref()
This makes it more symmetrical with adopt_own() (which is used to
create a NonnullOwnPtr from the result of a naked new.)
Diffstat (limited to 'Kernel/Process.cpp')
-rw-r--r-- | Kernel/Process.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index e451ff8969..259f931d11 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -143,7 +143,7 @@ RefPtr<Process> Process::create_user_process(RefPtr<Thread>& first_thread, const if (!cwd) cwd = VFS::the().root_custody(); - auto process = adopt(*new Process(first_thread, parts.take_last(), uid, gid, parent_pid, false, move(cwd), nullptr, tty)); + auto process = adopt_ref(*new Process(first_thread, parts.take_last(), uid, gid, parent_pid, false, move(cwd), nullptr, tty)); if (!first_thread) return {}; process->m_fds.resize(m_max_open_file_descriptors); @@ -171,7 +171,7 @@ RefPtr<Process> Process::create_user_process(RefPtr<Thread>& first_thread, const RefPtr<Process> Process::create_kernel_process(RefPtr<Thread>& first_thread, String&& name, void (*entry)(void*), void* entry_data, u32 affinity) { - auto process = adopt(*new Process(first_thread, move(name), (uid_t)0, (gid_t)0, ProcessID(0), true)); + auto process = adopt_ref(*new Process(first_thread, move(name), (uid_t)0, (gid_t)0, ProcessID(0), true)); if (!first_thread) return {}; first_thread->tss().eip = (FlatPtr)entry; |