mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:47:35 +00:00
Kernel+LibC: Implement FIONREAD ioctl
FIONREAD gets the number of bytes availible to read from a file descriptor without blocking. I only implemented it for regular files and sockets
This commit is contained in:
parent
db92e66902
commit
39a77559f1
7 changed files with 38 additions and 4 deletions
|
@ -38,6 +38,10 @@ public:
|
|||
bool is_empty() const { return m_empty; }
|
||||
|
||||
size_t space_for_writing() const { return m_space_for_writing; }
|
||||
size_t immediately_readable() const
|
||||
{
|
||||
return (m_read_buffer->size - m_read_buffer_index) + m_write_buffer->size;
|
||||
}
|
||||
|
||||
void set_unblock_callback(Function<void()> callback)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue