mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 00:37:34 +00:00
Kernel: Stop using *LockRefPtr for TTY
TTY was only stored in Process::m_tty, so make that a SpinlockProtected.
This commit is contained in:
parent
350e5f9261
commit
1c77803845
6 changed files with 35 additions and 20 deletions
|
@ -26,7 +26,7 @@ ErrorOr<NonnullRefPtr<OpenFileDescription>> SelfTTYDevice::open(int options)
|
|||
if (!Process::has_current())
|
||||
return Error::from_errno(ESRCH);
|
||||
auto& current_process = Process::current();
|
||||
LockRefPtr<TTY> tty = current_process.tty();
|
||||
auto tty = current_process.tty();
|
||||
if (!tty)
|
||||
return Error::from_errno(ENXIO);
|
||||
auto description = TRY(OpenFileDescription::try_create(*tty));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue