1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:37:34 +00:00

Kernel: Use RefPtr instead of LockRefPtr for File and subclasses

This was mostly straightforward, as all the storage locations are
guarded by some related mutex.

The use of old-school associated mutexes instead of MutexProtected
is unfortunate, but the process to modernize such code is ongoing.
This commit is contained in:
Andreas Kling 2023-03-10 07:53:02 +01:00
parent 61bb9103c2
commit 03cc45e5a2
20 changed files with 63 additions and 63 deletions

View file

@ -102,7 +102,7 @@ public:
ErrorOr<void> register_watcher(Badge<InodeWatcher>, InodeWatcher&);
void unregister_watcher(Badge<InodeWatcher>, InodeWatcher&);
ErrorOr<NonnullLockRefPtr<FIFO>> fifo();
ErrorOr<NonnullRefPtr<FIFO>> fifo();
bool can_apply_flock(flock const&, Optional<OpenFileDescription const&> = {}) const;
ErrorOr<void> apply_flock(Process const&, OpenFileDescription const&, Userspace<flock const*>, ShouldBlock);
@ -134,7 +134,7 @@ private:
LockWeakPtr<LocalSocket> m_bound_socket;
SpinlockProtected<HashTable<InodeWatcher*>, LockRank::None> m_watchers {};
bool m_metadata_dirty { false };
LockRefPtr<FIFO> m_fifo;
RefPtr<FIFO> m_fifo;
IntrusiveListNode<Inode> m_inode_list_node;
struct Flock {