diff options
author | Andreas Kling <kling@serenityos.org> | 2021-07-11 01:39:51 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-11 01:39:51 +0200 |
commit | c1143e1bae642d2f5c60265d7df0e3ed2c9024c7 (patch) | |
tree | 0f55b6ab829419127a58e2847ad9ffabba77306c | |
parent | 358a7cc448208dd3771c049808213ccca4da409d (diff) | |
download | serenity-c1143e1bae642d2f5c60265d7df0e3ed2c9024c7.zip |
Kernel: Remove friend classes from ProcFSComponentsRegistrar
-rw-r--r-- | Kernel/GlobalProcessExposed.cpp | 2 | ||||
-rw-r--r-- | Kernel/ProcessExposed.cpp | 2 | ||||
-rw-r--r-- | Kernel/ProcessExposed.h | 6 |
3 files changed, 3 insertions, 7 deletions
diff --git a/Kernel/GlobalProcessExposed.cpp b/Kernel/GlobalProcessExposed.cpp index 1d821ea314..82e3317f74 100644 --- a/Kernel/GlobalProcessExposed.cpp +++ b/Kernel/GlobalProcessExposed.cpp @@ -867,7 +867,7 @@ UNMAP_AFTER_INIT NonnullRefPtr<ProcFSRootDirectory> ProcFSRootDirectory::must_cr KResult ProcFSRootDirectory::traverse_as_directory(unsigned fsid, Function<bool(FileSystem::DirectoryEntryView const&)> callback) const { - Locker locker(ProcFSComponentsRegistrar::the().m_lock); + Locker locker(ProcFSComponentsRegistrar::the().get_lock()); callback({ ".", { fsid, component_index() }, 0 }); callback({ "..", { fsid, 0 }, 0 }); diff --git a/Kernel/ProcessExposed.cpp b/Kernel/ProcessExposed.cpp index 802a1dfe32..a7a4bdd2d8 100644 --- a/Kernel/ProcessExposed.cpp +++ b/Kernel/ProcessExposed.cpp @@ -242,7 +242,7 @@ RefPtr<ProcFSExposedComponent> ProcFSExposedDirectory::lookup(StringView name) KResult ProcFSExposedDirectory::traverse_as_directory(unsigned fsid, Function<bool(FileSystem::DirectoryEntryView const&)> callback) const { - Locker locker(ProcFSComponentsRegistrar::the().m_lock); + Locker locker(ProcFSComponentsRegistrar::the().get_lock()); auto parent_folder = m_parent_folder.strong_ref(); if (parent_folder.is_null()) return KResult(EINVAL); diff --git a/Kernel/ProcessExposed.h b/Kernel/ProcessExposed.h index 05dfd6e37c..bd83bf2c6c 100644 --- a/Kernel/ProcessExposed.h +++ b/Kernel/ProcessExposed.h @@ -29,11 +29,6 @@ class ProcFSBusDirectory; class ProcFSSystemBoolean; class ProcFSComponentsRegistrar { - friend class ProcFS; - friend class ProcFSExposedComponent; - friend class ProcFSExposedDirectory; - friend class ProcFSRootDirectory; - public: static ProcFSComponentsRegistrar& the(); @@ -50,6 +45,7 @@ public: void unregister_process(Process&); ProcFSRootDirectory& root_folder() { return *m_root_folder; } + Lock& get_lock() { return m_lock; } private: Lock m_lock; |