mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 19:52:07 +00:00
Rename FileDescriptor::has_data_available_for_reading() -> can_read().
This commit is contained in:
parent
a8baee4dcd
commit
8ad2dfb6e1
4 changed files with 6 additions and 6 deletions
|
@ -1076,7 +1076,7 @@ ssize_t Process::sys$read(int fd, void* outbuf, size_t nread)
|
|||
if (!descriptor)
|
||||
return -EBADF;
|
||||
if (descriptor->is_blocking()) {
|
||||
if (!descriptor->has_data_available_for_reading(*this)) {
|
||||
if (!descriptor->can_read(*this)) {
|
||||
m_blocked_fd = fd;
|
||||
block(BlockedRead);
|
||||
sched_yield();
|
||||
|
@ -1964,7 +1964,7 @@ int Process::sys$select(const Syscall::SC_select_params* params)
|
|||
memset(readfds, 0, sizeof(fd_set));
|
||||
auto bitmap = Bitmap::wrap((byte*)readfds, FD_SETSIZE);
|
||||
for (int fd : m_select_read_fds) {
|
||||
if (m_fds[fd].descriptor->has_data_available_for_reading(*this)) {
|
||||
if (m_fds[fd].descriptor->can_read(*this)) {
|
||||
bitmap.set(fd, true);
|
||||
++markedfds;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue