mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:17:46 +00:00
Kernel/TTY: Protect SlavePTY pointer with proper spinlock
Instead of using a LockRefPtr, we could easily use SpinlockProtected to ensure proper locking of this pointer.
This commit is contained in:
parent
b55199c227
commit
82428e2a05
2 changed files with 50 additions and 34 deletions
|
@ -43,7 +43,7 @@ private:
|
|||
virtual ErrorOr<void> ioctl(OpenFileDescription&, unsigned request, Userspace<void*> arg) override;
|
||||
virtual StringView class_name() const override { return "MasterPTY"sv; }
|
||||
|
||||
LockRefPtr<SlavePTY> m_slave;
|
||||
SpinlockProtected<RefPtr<SlavePTY>, LockRank::None> m_slave;
|
||||
unsigned m_index;
|
||||
bool m_closed { false };
|
||||
NonnullOwnPtr<DoubleBuffer> m_buffer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue