mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:38:12 +00:00
Kernel: Make self-contained locking smart pointers their own classes
Until now, our kernel has reimplemented a number of AK classes to provide automatic internal locking: - RefPtr - NonnullRefPtr - WeakPtr - Weakable This patch renames the Kernel classes so that they can coexist with the original AK classes: - RefPtr => LockRefPtr - NonnullRefPtr => NonnullLockRefPtr - WeakPtr => LockWeakPtr - Weakable => LockWeakable The goal here is to eventually get rid of the Lock* classes in favor of using external locking.
This commit is contained in:
parent
e475263113
commit
11eee67b85
360 changed files with 1703 additions and 1672 deletions
|
@ -205,17 +205,17 @@ ErrorOr<size_t> ProcFSExposedLink::read_bytes(off_t offset, size_t count, UserOr
|
|||
return nread;
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<Inode>> ProcFSExposedLink::to_inode(ProcFS const& procfs_instance) const
|
||||
ErrorOr<NonnullLockRefPtr<Inode>> ProcFSExposedLink::to_inode(ProcFS const& procfs_instance) const
|
||||
{
|
||||
return TRY(ProcFSLinkInode::try_create(procfs_instance, *this));
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<Inode>> ProcFSExposedComponent::to_inode(ProcFS const& procfs_instance) const
|
||||
ErrorOr<NonnullLockRefPtr<Inode>> ProcFSExposedComponent::to_inode(ProcFS const& procfs_instance) const
|
||||
{
|
||||
return TRY(ProcFSGlobalInode::try_create(procfs_instance, *this));
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<Inode>> ProcFSExposedDirectory::to_inode(ProcFS const& procfs_instance) const
|
||||
ErrorOr<NonnullLockRefPtr<Inode>> ProcFSExposedDirectory::to_inode(ProcFS const& procfs_instance) const
|
||||
{
|
||||
return TRY(ProcFSDirectoryInode::try_create(procfs_instance, *this));
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ void ProcFSExposedDirectory::add_component(ProcFSExposedComponent const&)
|
|||
TODO();
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<ProcFSExposedComponent>> ProcFSExposedDirectory::lookup(StringView name)
|
||||
ErrorOr<NonnullLockRefPtr<ProcFSExposedComponent>> ProcFSExposedDirectory::lookup(StringView name)
|
||||
{
|
||||
for (auto& component : m_components) {
|
||||
if (component.name() == name) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue