mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
Kernel: Add explicit offset parameter to File::read etc
This commit is contained in:
parent
68c7ca7d3b
commit
a3edeb5868
45 changed files with 199 additions and 183 deletions
|
@ -227,7 +227,7 @@ void LocalSocket::detach(FileDescription& description)
|
|||
}
|
||||
}
|
||||
|
||||
bool LocalSocket::can_read(const FileDescription& description) const
|
||||
bool LocalSocket::can_read(const FileDescription& description, size_t) const
|
||||
{
|
||||
auto role = this->role(description);
|
||||
if (role == Role::Listener)
|
||||
|
@ -249,7 +249,7 @@ bool LocalSocket::has_attached_peer(const FileDescription& description) const
|
|||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
bool LocalSocket::can_write(const FileDescription& description) const
|
||||
bool LocalSocket::can_write(const FileDescription& description, size_t) const
|
||||
{
|
||||
auto role = this->role(description);
|
||||
if (role == Role::Accepted)
|
||||
|
@ -298,7 +298,7 @@ ssize_t LocalSocket::recvfrom(FileDescription& description, void* buffer, size_t
|
|||
return 0;
|
||||
return -EAGAIN;
|
||||
}
|
||||
} else if (!can_read(description)) {
|
||||
} else if (!can_read(description, 0)) {
|
||||
auto result = Thread::current->block<Thread::ReadBlocker>(description);
|
||||
if (result != Thread::BlockResult::WokeNormally)
|
||||
return -EINTR;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue