1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 12:05:00 +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:
Liav A 2023-04-05 13:21:11 +03:00 committed by Linus Groh
parent dd7633c5f4
commit b02ee664e7
114 changed files with 230 additions and 218 deletions

View file

@ -39,9 +39,9 @@ UNMAP_AFTER_INIT void BIOSSysFSDirectory::set_dmi_32_bit_entry_initialization_va
m_smbios_structure_table_length = smbios_entry.ptr()->legacy_structure.smbios_table_length;
}
UNMAP_AFTER_INIT NonnullLockRefPtr<BIOSSysFSDirectory> BIOSSysFSDirectory::must_create(FirmwareSysFSDirectory& firmware_directory)
UNMAP_AFTER_INIT NonnullRefPtr<BIOSSysFSDirectory> BIOSSysFSDirectory::must_create(FirmwareSysFSDirectory& firmware_directory)
{
auto bios_directory = MUST(adopt_nonnull_lock_ref_or_enomem(new (nothrow) BIOSSysFSDirectory(firmware_directory)));
auto bios_directory = MUST(adopt_nonnull_ref_or_enomem(new (nothrow) BIOSSysFSDirectory(firmware_directory)));
bios_directory->create_components();
return bios_directory;
}