mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:48: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
|
@ -16,10 +16,10 @@ namespace Kernel {
|
|||
|
||||
static Atomic<int> s_next_fifo_id = 1;
|
||||
|
||||
ErrorOr<NonnullLockRefPtr<FIFO>> FIFO::try_create(UserID uid)
|
||||
ErrorOr<NonnullRefPtr<FIFO>> FIFO::try_create(UserID uid)
|
||||
{
|
||||
auto buffer = TRY(DoubleBuffer::try_create("FIFO: Buffer"sv));
|
||||
return adopt_nonnull_lock_ref_or_enomem(new (nothrow) FIFO(uid, move(buffer)));
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) FIFO(uid, move(buffer)));
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<OpenFileDescription>> FIFO::open_direction(FIFO::Direction direction)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue