diff options
author | Andreas Kling <kling@serenityos.org> | 2021-08-15 16:37:45 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-15 16:53:03 +0200 |
commit | 6a20733fcd2dabebc0e5954bb1971628a3c3ef6e (patch) | |
tree | dde5aa1f1630590e1ce785261044cb28633647a0 /Kernel/Net/TCPSocket.cpp | |
parent | 706330302289e7cd50f6c42a637f79a5b21a8911 (diff) | |
download | serenity-6a20733fcd2dabebc0e5954bb1971628a3c3ef6e.zip |
Kernel: Convert TCP retransmit queue from HashTable to IntrusiveList
Diffstat (limited to 'Kernel/Net/TCPSocket.cpp')
-rw-r--r-- | Kernel/Net/TCPSocket.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Kernel/Net/TCPSocket.cpp b/Kernel/Net/TCPSocket.cpp index b55982b9a4..87ec059409 100644 --- a/Kernel/Net/TCPSocket.cpp +++ b/Kernel/Net/TCPSocket.cpp @@ -512,24 +512,24 @@ KResult TCPSocket::close() return result; } -static Singleton<ProtectedValue<HashTable<TCPSocket*>>> s_sockets_for_retransmit; +static Singleton<ProtectedValue<TCPSocket::RetransmitList>> s_sockets_for_retransmit; -ProtectedValue<HashTable<TCPSocket*>>& TCPSocket::sockets_for_retransmit() +ProtectedValue<TCPSocket::RetransmitList>& TCPSocket::sockets_for_retransmit() { return *s_sockets_for_retransmit; } void TCPSocket::enqueue_for_retransmit() { - sockets_for_retransmit().with_exclusive([&](auto& table) { - table.set(this); + sockets_for_retransmit().with_exclusive([&](auto& list) { + list.append(*this); }); } void TCPSocket::dequeue_for_retransmit() { - sockets_for_retransmit().with_exclusive([&](auto& table) { - table.remove(this); + sockets_for_retransmit().with_exclusive([&](auto& list) { + list.remove(*this); }); } |