mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-21 07:06:04 +00:00
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:
@@ -264,8 +264,7 @@ ssize_t IPv4Socket::recvfrom(FileDescription& description, void* buffer, size_t
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
load_receive_deadline();
|
||||
auto res = current->block<Thread::ReceiveBlocker>(description);
|
||||
auto res = current->block<Thread::ReadBlocker>(description);
|
||||
|
||||
LOCKER(lock());
|
||||
if (!m_can_read) {
|
||||
@@ -312,8 +311,7 @@ ssize_t IPv4Socket::recvfrom(FileDescription& description, void* buffer, size_t
|
||||
return 0;
|
||||
}
|
||||
|
||||
load_receive_deadline();
|
||||
auto res = current->block<Thread::ReceiveBlocker>(description);
|
||||
auto res = current->block<Thread::ReadBlocker>(description);
|
||||
|
||||
LOCKER(lock());
|
||||
if (!m_can_read) {
|
||||
|
||||
Reference in New Issue
Block a user