mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +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:
@@ -43,11 +43,11 @@ ErrorOr<void> LocalSocket::try_for_each(Function<ErrorOr<void>(LocalSocket const
|
||||
});
|
||||
}
|
||||
|
||||
ErrorOr<NonnullLockRefPtr<LocalSocket>> LocalSocket::try_create(int type)
|
||||
ErrorOr<NonnullRefPtr<LocalSocket>> LocalSocket::try_create(int type)
|
||||
{
|
||||
auto client_buffer = TRY(DoubleBuffer::try_create("LocalSocket: Client buffer"sv));
|
||||
auto server_buffer = TRY(DoubleBuffer::try_create("LocalSocket: Server buffer"sv));
|
||||
return adopt_nonnull_lock_ref_or_enomem(new (nothrow) LocalSocket(type, move(client_buffer), move(server_buffer)));
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) LocalSocket(type, move(client_buffer), move(server_buffer)));
|
||||
}
|
||||
|
||||
ErrorOr<SocketPair> LocalSocket::try_create_connected_pair(int type)
|
||||
|
||||
Reference in New Issue
Block a user