mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:27:43 +00:00
Kernel: Rename SystemRegistrar => SysFSComponentRegistry
This commit is contained in:
parent
ea8578bf11
commit
27244eb0ee
7 changed files with 19 additions and 19 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue