1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00

Kernel: Introduce ThreadBlocker as a way to make unblocking neater :)

And port all the descriptor-based blocks over to it as a proof of concept.
This commit is contained in:
Robin Burchell 2019-07-18 16:22:26 +02:00 committed by Andreas Kling
parent a27c9e3e01
commit 0c8813e6d9
6 changed files with 154 additions and 67 deletions

View file

@ -212,7 +212,7 @@ ssize_t IPv4Socket::recvfrom(FileDescription& description, void* buffer, size_t
}
load_receive_deadline();
current->block(Thread::BlockedReceive, description);
current->block(*new Thread::ThreadBlockerReceive(description));
LOCKER(lock());
if (!m_can_read) {