mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
Kernel: Use RefPtr instead of LockRefPtr for File and subclasses
This was mostly straightforward, as all the storage locations are guarded by some related mutex. The use of old-school associated mutexes instead of MutexProtected is unfortunate, but the process to modernize such code is ongoing.
This commit is contained in:
parent
61bb9103c2
commit
03cc45e5a2
20 changed files with 63 additions and 63 deletions
|
@ -14,9 +14,9 @@ class Inode;
|
|||
|
||||
class InodeFile final : public File {
|
||||
public:
|
||||
static ErrorOr<NonnullLockRefPtr<InodeFile>> create(NonnullRefPtr<Inode> inode)
|
||||
static ErrorOr<NonnullRefPtr<InodeFile>> create(NonnullRefPtr<Inode> inode)
|
||||
{
|
||||
auto file = adopt_lock_ref_if_nonnull(new (nothrow) InodeFile(move(inode)));
|
||||
auto file = adopt_ref_if_nonnull(new (nothrow) InodeFile(move(inode)));
|
||||
if (!file)
|
||||
return ENOMEM;
|
||||
return file.release_nonnull();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue