diff options
author | Andreas Kling <kling@serenityos.org> | 2023-04-02 18:35:32 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-04 10:33:42 +0200 |
commit | 65438d8a850cd79c343c8e92cec92f9f699f2110 (patch) | |
tree | ac4d578d78b2abfeea459dee02f8dd2732580f69 /Kernel/Syscalls | |
parent | 19084ef743fc6a616d0639d201f18b673d77d08a (diff) | |
download | serenity-65438d8a850cd79c343c8e92cec92f9f699f2110.zip |
Kernel: Stop using *LockRefPtr for Process pointers
The only persistent one of these was Thread::m_process and that never
changes after initialization. Make it const to enforce this and switch
everything over to RefPtr & NonnullRefPtr.
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r-- | Kernel/Syscalls/waitid.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Syscalls/waitid.cpp b/Kernel/Syscalls/waitid.cpp index 8398376658..8e13825189 100644 --- a/Kernel/Syscalls/waitid.cpp +++ b/Kernel/Syscalls/waitid.cpp @@ -10,7 +10,7 @@ namespace Kernel { -ErrorOr<siginfo_t> Process::do_waitid(Variant<Empty, NonnullLockRefPtr<Process>, NonnullLockRefPtr<ProcessGroup>> waitee, int options) +ErrorOr<siginfo_t> Process::do_waitid(Variant<Empty, NonnullRefPtr<Process>, NonnullLockRefPtr<ProcessGroup>> waitee, int options) { ErrorOr<siginfo_t> result = siginfo_t {}; if (Thread::current()->block<Thread::WaitBlocker>({}, options, move(waitee), result).was_interrupted()) @@ -25,7 +25,7 @@ ErrorOr<FlatPtr> Process::sys$waitid(Userspace<Syscall::SC_waitid_params const*> TRY(require_promise(Pledge::proc)); auto params = TRY(copy_typed_from_user(user_params)); - Variant<Empty, NonnullLockRefPtr<Process>, NonnullLockRefPtr<ProcessGroup>> waitee; + Variant<Empty, NonnullRefPtr<Process>, NonnullLockRefPtr<ProcessGroup>> waitee; switch (params.idtype) { case P_ALL: break; |