summaryrefslogtreecommitdiff
path: root/Kernel/Net/TCPSocket.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-08-21 23:31:15 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-22 03:34:09 +0200
commitc2fc33becd8df6b84a7487565287d34e4607d588 (patch)
treede529a4670e0d75ae2a64627fea41a18ca9f6c06 /Kernel/Net/TCPSocket.cpp
parent81d990b551b79af027b44463b1e7da35ec62c1b4 (diff)
downloadserenity-c2fc33becd8df6b84a7487565287d34e4607d588.zip
Kernel: Rename ProtectedValue<T> => MutexProtected<T>
Let's make it obvious what we're protecting it with.
Diffstat (limited to 'Kernel/Net/TCPSocket.cpp')
-rw-r--r--Kernel/Net/TCPSocket.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Kernel/Net/TCPSocket.cpp b/Kernel/Net/TCPSocket.cpp
index 87ec059409..ac21e380fe 100644
--- a/Kernel/Net/TCPSocket.cpp
+++ b/Kernel/Net/TCPSocket.cpp
@@ -9,7 +9,7 @@
#include <Kernel/Debug.h>
#include <Kernel/Devices/RandomDevice.h>
#include <Kernel/FileSystem/FileDescription.h>
-#include <Kernel/Locking/ProtectedValue.h>
+#include <Kernel/Locking/MutexProtected.h>
#include <Kernel/Net/EthernetFrameHeader.h>
#include <Kernel/Net/IPv4.h>
#include <Kernel/Net/NetworkAdapter.h>
@@ -56,16 +56,16 @@ void TCPSocket::set_state(State new_state)
evaluate_block_conditions();
}
-static Singleton<ProtectedValue<HashMap<IPv4SocketTuple, RefPtr<TCPSocket>>>> s_socket_closing;
+static Singleton<MutexProtected<HashMap<IPv4SocketTuple, RefPtr<TCPSocket>>>> s_socket_closing;
-ProtectedValue<HashMap<IPv4SocketTuple, RefPtr<TCPSocket>>>& TCPSocket::closing_sockets()
+MutexProtected<HashMap<IPv4SocketTuple, RefPtr<TCPSocket>>>& TCPSocket::closing_sockets()
{
return *s_socket_closing;
}
-static Singleton<ProtectedValue<HashMap<IPv4SocketTuple, TCPSocket*>>> s_socket_tuples;
+static Singleton<MutexProtected<HashMap<IPv4SocketTuple, TCPSocket*>>> s_socket_tuples;
-ProtectedValue<HashMap<IPv4SocketTuple, TCPSocket*>>& TCPSocket::sockets_by_tuple()
+MutexProtected<HashMap<IPv4SocketTuple, TCPSocket*>>& TCPSocket::sockets_by_tuple()
{
return *s_socket_tuples;
}
@@ -512,9 +512,9 @@ KResult TCPSocket::close()
return result;
}
-static Singleton<ProtectedValue<TCPSocket::RetransmitList>> s_sockets_for_retransmit;
+static Singleton<MutexProtected<TCPSocket::RetransmitList>> s_sockets_for_retransmit;
-ProtectedValue<TCPSocket::RetransmitList>& TCPSocket::sockets_for_retransmit()
+MutexProtected<TCPSocket::RetransmitList>& TCPSocket::sockets_for_retransmit()
{
return *s_sockets_for_retransmit;
}