mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-17 06:38:28 +00:00
vfs,libc: support write fds in select
By adding a 'write_ready' interface following the lines of the existing 'read_ready', VFS plugins become able to propagate the (de-)saturation of I/O buffers to the VFS user. This information is important when using a non-blocking file descriptor for writing into a TCP socket. Once the application observes EAGAIN, it expects a subsequent 'select' call to return as soon as new I/O buffer space becomes available. Before this patch, the select call would always return under this condition, causing an unnecessarily busy write loop. Issue #4697
This commit is contained in:
committed by
Christian Helmuth
parent
5ad98f2b7c
commit
ff2176a586
@ -113,6 +113,8 @@ class Vfs::Rom_file_system : public Single_file_system
|
||||
}
|
||||
|
||||
bool read_ready() override { return true; }
|
||||
|
||||
bool write_ready() const override { return false; }
|
||||
};
|
||||
|
||||
typedef Genode::Registered<Vfs_watch_handle> Registered_watch_handle;
|
||||
|
Reference in New Issue
Block a user