summaryrefslogtreecommitdiff
path: root/Kernel/Net
diff options
context:
space:
mode:
authorRobin Burchell <robin+git@viroteck.net>2019-07-19 10:12:50 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-19 11:03:22 +0200
commitcd76b691fbeb37977c9579d1a12715ddc10ab6c6 (patch)
tree88f800595293ff7a6672111b6eed2b9016648ca4 /Kernel/Net
parent99c53776530d3831d0e280e5733e96f971f46c96 (diff)
downloadserenity-cd76b691fbeb37977c9579d1a12715ddc10ab6c6.zip
Kernel: Remove memory allocations from the new Blocker API
Diffstat (limited to 'Kernel/Net')
-rw-r--r--Kernel/Net/IPv4Socket.cpp2
-rw-r--r--Kernel/Net/TCPSocket.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Net/IPv4Socket.cpp b/Kernel/Net/IPv4Socket.cpp
index 474706b7a2..1be12a55b3 100644
--- a/Kernel/Net/IPv4Socket.cpp
+++ b/Kernel/Net/IPv4Socket.cpp
@@ -212,7 +212,7 @@ ssize_t IPv4Socket::recvfrom(FileDescription& description, void* buffer, size_t
}
load_receive_deadline();
- current->block(*new Thread::ReceiveBlocker(description));
+ current->block<Thread::ReceiveBlocker>(description);
LOCKER(lock());
if (!m_can_read) {
diff --git a/Kernel/Net/TCPSocket.cpp b/Kernel/Net/TCPSocket.cpp
index 1e803e279a..348f924f28 100644
--- a/Kernel/Net/TCPSocket.cpp
+++ b/Kernel/Net/TCPSocket.cpp
@@ -162,7 +162,7 @@ KResult TCPSocket::protocol_connect(FileDescription& description, ShouldBlock sh
m_state = State::Connecting;
if (should_block == ShouldBlock::Yes) {
- current->block(*new Thread::ConnectBlocker(description));
+ current->block<Thread::ConnectBlocker>(description);
ASSERT(is_connected());
return KSuccess;
}