summaryrefslogtreecommitdiff
path: root/Kernel/Thread.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-03-06 19:29:25 +0100
committerAndreas Kling <kling@serenityos.org>2023-03-07 00:30:12 +0100
commitd1371d66f79d7482b4fe1acd58803c0a5db734f4 (patch)
tree98ead3246508f60971ceebf8478f0f22ebb7d98c /Kernel/Thread.h
parent36b0ecfe9e28c00f12cde7add7330c4ec8cf3339 (diff)
downloadserenity-d1371d66f79d7482b4fe1acd58803c0a5db734f4.zip
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.
Diffstat (limited to 'Kernel/Thread.h')
-rw-r--r--Kernel/Thread.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Thread.h b/Kernel/Thread.h
index a858664c6c..d6939d6a95 100644
--- a/Kernel/Thread.h
+++ b/Kernel/Thread.h
@@ -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 };
};