mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58: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
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
ErrorOr<NonnullLockRefPtr<Socket>> Socket::create(int domain, int type, int protocol)
|
||||
ErrorOr<NonnullRefPtr<Socket>> Socket::create(int domain, int type, int protocol)
|
||||
{
|
||||
switch (domain) {
|
||||
case AF_LOCAL:
|
||||
|
@ -46,7 +46,7 @@ void Socket::set_setup_state(SetupState new_setup_state)
|
|||
evaluate_block_conditions();
|
||||
}
|
||||
|
||||
LockRefPtr<Socket> Socket::accept()
|
||||
RefPtr<Socket> Socket::accept()
|
||||
{
|
||||
MutexLocker locker(mutex());
|
||||
if (m_pending.is_empty())
|
||||
|
@ -63,7 +63,7 @@ LockRefPtr<Socket> Socket::accept()
|
|||
return client;
|
||||
}
|
||||
|
||||
ErrorOr<void> Socket::queue_connection_from(NonnullLockRefPtr<Socket> peer)
|
||||
ErrorOr<void> Socket::queue_connection_from(NonnullRefPtr<Socket> peer)
|
||||
{
|
||||
dbgln_if(SOCKET_DEBUG, "Socket({}) queueing connection", this);
|
||||
MutexLocker locker(mutex());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue