1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 13:27:34 +00:00

Kernel: Remove memory allocations from the new Blocker API

This commit is contained in:
Robin Burchell 2019-07-19 10:12:50 +02:00 committed by Andreas Kling
parent 99c5377653
commit cd76b691fb
6 changed files with 27 additions and 27 deletions

View file

@ -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) {

View file

@ -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;
}