mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00:00
Kernel: Add support for the POLLWRBAND poll event
This commit is contained in:
parent
f2fef049e1
commit
265764ff2f
3 changed files with 14 additions and 6 deletions
|
@ -159,6 +159,8 @@ ErrorOr<FlatPtr> Process::sys$poll(Userspace<const Syscall::SC_poll_params*> use
|
|||
block_flags |= BlockFlags::Write;
|
||||
if (pfd.events & POLLPRI)
|
||||
block_flags |= BlockFlags::ReadPriority;
|
||||
if (pfd.events & POLLWRBAND)
|
||||
block_flags |= BlockFlags::WritePriority;
|
||||
TRY(fds_info.try_append({ move(description), block_flags }));
|
||||
}
|
||||
|
||||
|
@ -208,6 +210,10 @@ ErrorOr<FlatPtr> Process::sys$poll(Userspace<const Syscall::SC_poll_params*> use
|
|||
VERIFY(pfd.events & POLLOUT);
|
||||
pfd.revents |= POLLOUT;
|
||||
}
|
||||
if (has_flag(fds_entry.unblocked_flags, BlockFlags::WritePriority)) {
|
||||
VERIFY(pfd.events & POLLWRBAND);
|
||||
pfd.revents |= POLLWRBAND;
|
||||
}
|
||||
}
|
||||
if (pfd.revents)
|
||||
fds_with_revents++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue