mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 19:45:07 +00:00
Kernel: Get rid of *LockRefPtr in the SysFS filesystem code
To do this we also need to get rid of LockRefPtrs in the USB code as well. Most of the SysFS nodes are statically generated during boot and are not mutated afterwards. The same goes for general device code - once we generate the appropriate SysFS nodes, we almost never mutate the node pointers afterwards, making locking unnecessary.
This commit is contained in:
parent
dd7633c5f4
commit
b02ee664e7
114 changed files with 230 additions and 218 deletions
|
@ -93,7 +93,6 @@ ErrorOr<void> DisplayConnector::allocate_framebuffer_resources(size_t rounded_si
|
|||
|
||||
ErrorOr<void> DisplayConnector::after_inserting()
|
||||
{
|
||||
after_inserting_add_to_device_management();
|
||||
ArmedScopeGuard clean_from_device_management([&] {
|
||||
before_will_be_destroyed_remove_from_device_management();
|
||||
});
|
||||
|
@ -110,6 +109,7 @@ ErrorOr<void> DisplayConnector::after_inserting()
|
|||
auto sys_fs_component = TRY(SysFSSymbolicLinkDeviceComponent::try_create(SysFSCharacterDevicesDirectory::the(), *this, *m_sysfs_device_directory));
|
||||
m_symlink_sysfs_component = sys_fs_component;
|
||||
after_inserting_add_symlink_to_device_identifier_directory();
|
||||
|
||||
ArmedScopeGuard clean_symlink_to_device_identifier_directory([&] {
|
||||
VERIFY(m_symlink_sysfs_component);
|
||||
before_will_be_destroyed_remove_symlink_from_device_identifier_directory();
|
||||
|
@ -136,6 +136,7 @@ ErrorOr<void> DisplayConnector::after_inserting()
|
|||
if (m_enable_write_combine_optimization) {
|
||||
[[maybe_unused]] auto result = m_framebuffer_region->set_write_combine(true);
|
||||
}
|
||||
after_inserting_add_to_device_management();
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue