Support for suspendable read in VFS and libC

The support has two parts. First, a VFS plugin now gets passed an
I/O-response handler callback on construction, which informs users of the
VFS that an I/O event occurred. This enables, for example, the libC to
check if blocking read can be completed. Further, the VFS file I/O
interface provides now functions for suspendable reads, i.e.,
queue_read() and complete_read().
This commit is contained in:
Christian Helmuth
2017-01-31 16:38:23 +01:00
committed by Norman Feske
parent e5d6c06f58
commit c0d61858c3
25 changed files with 199 additions and 71 deletions

View File

@ -209,6 +209,7 @@ class Vfs::Dir_file_system : public File_system
Dir_file_system(Genode::Env &env,
Genode::Allocator &alloc,
Genode::Xml_node node,
Io_response_handler &io_handler,
File_system_factory &fs_factory)
:
_first_file_system(0)
@ -228,11 +229,11 @@ class Vfs::Dir_file_system : public File_system
/* traverse into <dir> nodes */
if (sub_node.has_type("dir")) {
_append_file_system(new (alloc)
Dir_file_system(env, alloc, sub_node, fs_factory));
Dir_file_system(env, alloc, sub_node, io_handler, fs_factory));
continue;
}
File_system *fs = fs_factory.create(env, alloc, sub_node);
File_system *fs = fs_factory.create(env, alloc, sub_node, io_handler);
if (fs) {
_append_file_system(fs);
continue;