diff options
author | Andreas Kling <kling@serenityos.org> | 2021-07-11 01:05:26 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-11 01:05:26 +0200 |
commit | 27244eb0eea0d4a3c7a2e5174f9fd7bc3a547e7d (patch) | |
tree | 549d88afc6223c9a8dcb98ccfe68371d57a2b12e | |
parent | ea8578bf11dae4dc83c571f512baf7ea8a33a456 (diff) | |
download | serenity-27244eb0eea0d4a3c7a2e5174f9fd7bc3a547e7d.zip |
Kernel: Rename SystemRegistrar => SysFSComponentRegistry
-rw-r--r-- | Kernel/ACPI/Parser.cpp | 4 | ||||
-rw-r--r-- | Kernel/Arch/PC/BIOS.cpp | 4 | ||||
-rw-r--r-- | Kernel/Bus/PCI/Access.cpp | 4 | ||||
-rw-r--r-- | Kernel/FileSystem/SysFS.cpp | 14 | ||||
-rw-r--r-- | Kernel/FileSystem/SysFS.h | 8 | ||||
-rw-r--r-- | Kernel/SystemExposed.cpp | 2 | ||||
-rw-r--r-- | Kernel/init.cpp | 2 |
7 files changed, 19 insertions, 19 deletions
diff --git a/Kernel/ACPI/Parser.cpp b/Kernel/ACPI/Parser.cpp index 0d5926e45c..41df230453 100644 --- a/Kernel/ACPI/Parser.cpp +++ b/Kernel/ACPI/Parser.cpp @@ -63,11 +63,11 @@ UNMAP_AFTER_INIT ExposedComponent::ExposedComponent(String name, PhysicalAddress UNMAP_AFTER_INIT void ExposedFolder::initialize() { auto acpi_folder = adopt_ref(*new (nothrow) ExposedFolder()); - SystemRegistrar::the().register_new_component(acpi_folder); + SysFSComponentRegistry::the().register_new_component(acpi_folder); } UNMAP_AFTER_INIT ExposedFolder::ExposedFolder() - : SystemExposedFolder("acpi", SystemRegistrar::the().root_folder()) + : SystemExposedFolder("acpi", SysFSComponentRegistry::the().root_folder()) { NonnullRefPtrVector<SystemExposedComponent> components; size_t ssdt_count = 0; diff --git a/Kernel/Arch/PC/BIOS.cpp b/Kernel/Arch/PC/BIOS.cpp index fc86d756d7..92286c0fdc 100644 --- a/Kernel/Arch/PC/BIOS.cpp +++ b/Kernel/Arch/PC/BIOS.cpp @@ -96,7 +96,7 @@ UNMAP_AFTER_INIT void BIOSExposedFolder::set_dmi_32_bit_entry_initialization_val UNMAP_AFTER_INIT void BIOSExposedFolder::initialize() { auto bios_folder = adopt_ref(*new (nothrow) BIOSExposedFolder()); - SystemRegistrar::the().register_new_component(bios_folder); + SysFSComponentRegistry::the().register_new_component(bios_folder); bios_folder->create_components(); } @@ -135,7 +135,7 @@ OwnPtr<KBuffer> BIOSExposedFolder::smbios_structure_table() const } UNMAP_AFTER_INIT BIOSExposedFolder::BIOSExposedFolder() - : SystemExposedFolder("bios", SystemRegistrar::the().root_folder()) + : SystemExposedFolder("bios", SysFSComponentRegistry::the().root_folder()) { auto entry_32bit = find_dmi_entry32bit_point(); m_dmi_entry_point = entry_32bit.value(); diff --git a/Kernel/Bus/PCI/Access.cpp b/Kernel/Bus/PCI/Access.cpp index f30b461a94..5c35f35809 100644 --- a/Kernel/Bus/PCI/Access.cpp +++ b/Kernel/Bus/PCI/Access.cpp @@ -389,11 +389,11 @@ UNMAP_AFTER_INIT ExposedDeviceFolder::ExposedDeviceFolder(const SystemExposedFol UNMAP_AFTER_INIT void BusExposedFolder::initialize() { auto pci_folder = adopt_ref(*new (nothrow) BusExposedFolder()); - SystemRegistrar::the().register_new_component(pci_folder); + SysFSComponentRegistry::the().register_new_component(pci_folder); } UNMAP_AFTER_INIT BusExposedFolder::BusExposedFolder() - : SystemExposedFolder("pci", SystemRegistrar::the().root_folder()) + : SystemExposedFolder("pci", SysFSComponentRegistry::the().root_folder()) { PCI::enumerate([&](const Address& address, ID) { auto pci_device = PCI::ExposedDeviceFolder::create(*this, address); diff --git a/Kernel/FileSystem/SysFS.cpp b/Kernel/FileSystem/SysFS.cpp index cc16af1782..07430c7812 100644 --- a/Kernel/FileSystem/SysFS.cpp +++ b/Kernel/FileSystem/SysFS.cpp @@ -12,25 +12,25 @@ namespace Kernel { -static AK::Singleton<SystemRegistrar> s_the; +static AK::Singleton<SysFSComponentRegistry> s_the; -SystemRegistrar& SystemRegistrar::the() +SysFSComponentRegistry& SysFSComponentRegistry::the() { return *s_the; } -UNMAP_AFTER_INIT void SystemRegistrar::initialize() +UNMAP_AFTER_INIT void SysFSComponentRegistry::initialize() { VERIFY(!s_the.is_initialized()); s_the.ensure_instance(); } -UNMAP_AFTER_INIT SystemRegistrar::SystemRegistrar() +UNMAP_AFTER_INIT SysFSComponentRegistry::SysFSComponentRegistry() : m_root_folder(SysFSRootFolder::create()) { } -UNMAP_AFTER_INIT void SystemRegistrar::register_new_component(SystemExposedComponent& component) +UNMAP_AFTER_INIT void SysFSComponentRegistry::register_new_component(SystemExposedComponent& component) { Locker locker(m_lock); m_root_folder->m_components.append(component); @@ -43,7 +43,7 @@ NonnullRefPtr<SysFSRootFolder> SysFSRootFolder::create() KResult SysFSRootFolder::traverse_as_directory(unsigned fsid, Function<bool(FileSystem::DirectoryEntryView const&)> callback) const { - Locker locker(SystemRegistrar::the().m_lock); + Locker locker(SysFSComponentRegistry::the().m_lock); callback({ ".", { fsid, component_index() }, 0 }); callback({ "..", { fsid, 0 }, 0 }); @@ -65,7 +65,7 @@ NonnullRefPtr<SysFS> SysFS::create() } SysFS::SysFS() - : m_root_inode(SystemRegistrar::the().m_root_folder->to_inode(*this)) + : m_root_inode(SysFSComponentRegistry::the().m_root_folder->to_inode(*this)) { Locker locker(m_lock); } diff --git a/Kernel/FileSystem/SysFS.h b/Kernel/FileSystem/SysFS.h index 7fe8a82806..882cec9c99 100644 --- a/Kernel/FileSystem/SysFS.h +++ b/Kernel/FileSystem/SysFS.h @@ -22,7 +22,7 @@ class SysFSInode; class SysFSDirectoryInode; class SysFSRootFolder final : public SystemExposedFolder { - friend class SystemRegistrar; + friend class SysFSComponentRegistry; public: static NonnullRefPtr<SysFSRootFolder> create(); @@ -32,18 +32,18 @@ private: SysFSRootFolder(); }; -class SystemRegistrar { +class SysFSComponentRegistry { friend class SysFS; friend class SystemExposedComponent; friend class SystemExposedFolder; friend class SysFSRootFolder; public: - static SystemRegistrar& the(); + static SysFSComponentRegistry& the(); static void initialize(); - SystemRegistrar(); + SysFSComponentRegistry(); void register_new_component(SystemExposedComponent&); NonnullRefPtr<SystemExposedFolder> root_folder() { return m_root_folder; } diff --git a/Kernel/SystemExposed.cpp b/Kernel/SystemExposed.cpp index 2471c69571..294f700fe8 100644 --- a/Kernel/SystemExposed.cpp +++ b/Kernel/SystemExposed.cpp @@ -28,7 +28,7 @@ SystemExposedComponent::SystemExposedComponent(StringView name) KResult SystemExposedFolder::traverse_as_directory(unsigned fsid, Function<bool(FileSystem::DirectoryEntryView const&)> callback) const { - Locker locker(SystemRegistrar::the().m_lock); + Locker locker(SysFSComponentRegistry::the().m_lock); VERIFY(m_parent_folder); callback({ ".", { fsid, component_index() }, 0 }); callback({ "..", { fsid, m_parent_folder->component_index() }, 0 }); diff --git a/Kernel/init.cpp b/Kernel/init.cpp index 3e7b8e8d56..31dedaaaf1 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -143,7 +143,7 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init() ACPI::initialize(); // Initialize the PCI Bus as early as possible, for early boot (PCI based) serial logging - SystemRegistrar::initialize(); + SysFSComponentRegistry::initialize(); ProcFSComponentsRegistrar::initialize(); PCI::initialize(); PCISerialDevice::detect(); |