summaryrefslogtreecommitdiff
path: root/Kernel/Net/Socket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Net/Socket.cpp')
-rw-r--r--Kernel/Net/Socket.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/Net/Socket.cpp b/Kernel/Net/Socket.cpp
index 6c36f8ff1d..b7c48c73cc 100644
--- a/Kernel/Net/Socket.cpp
+++ b/Kernel/Net/Socket.cpp
@@ -51,7 +51,7 @@ void Socket::set_setup_state(SetupState new_setup_state)
RefPtr<Socket> Socket::accept()
{
- LOCKER(m_lock);
+ Locker locker(m_lock);
if (m_pending.is_empty())
return nullptr;
dbgln_if(SOCKET_DEBUG, "Socket({}) de-queueing connection", this);
@@ -69,7 +69,7 @@ RefPtr<Socket> Socket::accept()
KResult Socket::queue_connection_from(NonnullRefPtr<Socket> peer)
{
dbgln_if(SOCKET_DEBUG, "Socket({}) queueing connection", this);
- LOCKER(m_lock);
+ Locker locker(m_lock);
if (m_pending.size() >= m_backlog)
return ECONNREFUSED;
m_pending.append(peer);
@@ -240,7 +240,7 @@ KResultOr<size_t> Socket::write(FileDescription& description, u64, const UserOrK
KResult Socket::shutdown(int how)
{
- LOCKER(lock());
+ Locker locker(lock());
if (type() == SOCK_STREAM && !is_connected())
return ENOTCONN;
if (m_role == Role::Listener)
@@ -263,7 +263,7 @@ KResult Socket::stat(::stat& st) const
void Socket::set_connected(bool connected)
{
- LOCKER(lock());
+ Locker locker(lock());
if (m_connected == connected)
return;
m_connected = connected;