mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 17:58:11 +00:00
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.
This commit is contained in:
parent
19084ef743
commit
65438d8a85
11 changed files with 42 additions and 42 deletions
|
@ -510,7 +510,7 @@ bool Thread::SignalBlocker::check_pending_signals(bool from_add_blocker)
|
|||
return true;
|
||||
}
|
||||
|
||||
Thread::WaitBlockerSet::ProcessBlockInfo::ProcessBlockInfo(NonnullLockRefPtr<Process>&& process, WaitBlocker::UnblockFlags flags, u8 signal)
|
||||
Thread::WaitBlockerSet::ProcessBlockInfo::ProcessBlockInfo(NonnullRefPtr<Process>&& process, WaitBlocker::UnblockFlags flags, u8 signal)
|
||||
: process(move(process))
|
||||
, flags(flags)
|
||||
, signal(signal)
|
||||
|
@ -663,7 +663,7 @@ void Thread::WaitBlockerSet::finalize()
|
|||
}
|
||||
}
|
||||
|
||||
Thread::WaitBlocker::WaitBlocker(int wait_options, Variant<Empty, NonnullLockRefPtr<Process>, NonnullLockRefPtr<ProcessGroup>> waitee, ErrorOr<siginfo_t>& result)
|
||||
Thread::WaitBlocker::WaitBlocker(int wait_options, Variant<Empty, NonnullRefPtr<Process>, NonnullLockRefPtr<ProcessGroup>> waitee, ErrorOr<siginfo_t>& result)
|
||||
: m_wait_options(wait_options)
|
||||
, m_result(result)
|
||||
, m_waitee(move(waitee))
|
||||
|
@ -731,7 +731,7 @@ bool Thread::WaitBlocker::unblock(Process& process, UnblockFlags flags, u8 signa
|
|||
VERIFY(flags != UnblockFlags::Terminated || signal == 0); // signal argument should be ignored for Terminated
|
||||
|
||||
bool do_not_unblock = m_waitee.visit(
|
||||
[&](NonnullLockRefPtr<Process> const& waitee_process) {
|
||||
[&](NonnullRefPtr<Process> const& waitee_process) {
|
||||
return &process != waitee_process;
|
||||
},
|
||||
[&](NonnullLockRefPtr<ProcessGroup> const& waitee_process_group) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue