mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
Kernel: Use non-locking {Nonnull,}RefPtr for OpenFileDescription
This patch switches away from {Nonnull,}LockRefPtr to the non-locking smart pointers throughout the kernel. I've looked at the handful of places where these were being persisted and I don't see any race situations. Note that the process file descriptor table (Process::m_fds) was already guarded via MutexProtected.
This commit is contained in:
parent
36b0ecfe9e
commit
d1371d66f7
34 changed files with 82 additions and 80 deletions
|
@ -519,7 +519,7 @@ public:
|
|||
explicit OpenFileDescriptionBlocker(OpenFileDescription&, BlockFlags, BlockFlags&);
|
||||
|
||||
private:
|
||||
NonnullLockRefPtr<OpenFileDescription> m_blocked_description;
|
||||
NonnullRefPtr<OpenFileDescription> m_blocked_description;
|
||||
const BlockFlags m_flags;
|
||||
BlockFlags& m_unblocked_flags;
|
||||
bool m_did_unblock { false };
|
||||
|
@ -577,7 +577,7 @@ public:
|
|||
class SelectBlocker final : public FileBlocker {
|
||||
public:
|
||||
struct FDInfo {
|
||||
LockRefPtr<OpenFileDescription> description;
|
||||
RefPtr<OpenFileDescription> description;
|
||||
BlockFlags block_flags { BlockFlags::None };
|
||||
BlockFlags unblocked_flags { BlockFlags::None };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue