mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
Kernel/SysFS: Reduce the responsibilities of the Registry object
Instead, let the /sys/dev/block and /sys/dev/char directories to handle the registering part of SysFSDeviceComponents by themselves.
This commit is contained in:
parent
ecc29bb52e
commit
6733f19b3c
11 changed files with 72 additions and 31 deletions
|
@ -16,7 +16,6 @@
|
|||
namespace Kernel {
|
||||
|
||||
class SysFSComponentRegistry {
|
||||
using DevicesList = MutexProtected<IntrusiveList<&SysFSDeviceComponent::m_list_node>>;
|
||||
|
||||
public:
|
||||
static SysFSComponentRegistry& the();
|
||||
|
@ -27,17 +26,13 @@ public:
|
|||
void register_new_component(SysFSComponent&);
|
||||
|
||||
SysFSDirectory& root_directory() { return m_root_directory; }
|
||||
Mutex& get_lock() { return m_lock; }
|
||||
|
||||
void register_new_bus_directory(SysFSDirectory&);
|
||||
SysFSBusDirectory& buses_directory();
|
||||
|
||||
DevicesList& devices_list();
|
||||
|
||||
private:
|
||||
Mutex m_lock;
|
||||
NonnullRefPtr<SysFSRootDirectory> m_root_directory;
|
||||
DevicesList m_devices_list;
|
||||
Spinlock m_root_directory_lock;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue