Kernel: Stop using *LockRefPtr for TTY

TTY was only stored in Process::m_tty, so make that a SpinlockProtected.
This commit is contained in:
Andreas Kling 2023-04-04 07:47:21 +02:00
commit 1c77803845
Notes: sideshowbarker 2024-07-16 21:56:36 +09:00
6 changed files with 35 additions and 20 deletions

View file

@ -39,7 +39,7 @@ ErrorOr<FlatPtr> Process::sys$setsid()
auto process_group = TRY(ProcessGroup::create(ProcessGroupID(pid().value())));
m_pg.with([&](auto& pg) { pg = move(process_group); });
m_tty = nullptr;
m_tty.with([](auto& tty) { tty = nullptr; });
return with_mutable_protected_data([&](auto& protected_data) -> ErrorOr<FlatPtr> {
protected_data.sid = pid().value();
return protected_data.sid.value();