Kernel: read()/write() should respect timeouts when used on a sockets

Move timeout management to the ReadBlocker and WriteBlocker classes.
Also get rid of the specialized ReceiveBlocker since it no longer does
anything that ReadBlocker can't do.
This commit is contained in:
Andreas Kling 2020-01-26 17:54:23 +01:00
commit 137a45dff2
Notes: sideshowbarker 2024-07-19 09:46:50 +09:00
7 changed files with 48 additions and 57 deletions

View file

@ -296,7 +296,7 @@ ssize_t LocalSocket::recvfrom(FileDescription& description, void* buffer, size_t
return -EAGAIN;
}
} else if (!can_read(description)) {
auto result = current->block<Thread::ReceiveBlocker>(description);
auto result = current->block<Thread::ReadBlocker>(description);
if (result != Thread::BlockResult::WokeNormally)
return -EINTR;
}