mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
Kernel: Remove friend classes from ProcFSComponentsRegistrar
This commit is contained in:
parent
358a7cc448
commit
c1143e1bae
3 changed files with 3 additions and 7 deletions
|
@ -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 });
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue