Add READ_READY support to file-system session

The read-ready packet informs the server that the client wants to be
notified if a handle becomes readable. When becoming readable, the
server acknowledges packet and the client may queue a read requests
accordingly.
This commit is contained in:
Christian Helmuth 2017-01-31 15:36:00 +01:00 committed by Norman Feske
parent 8185a49b4c
commit b805e001db
8 changed files with 34 additions and 3 deletions

View File

@ -80,6 +80,10 @@ class File_system::Session_component : public Session_rpc_object
case Packet_descriptor::WRITE:
res_length = node.write((char const *)content, length, offset);
break;
case Packet_descriptor::READ_READY:
/* not supported */
break;
}
packet.length(res_length);

View File

@ -98,6 +98,10 @@ namespace File_system {
case Packet_descriptor::WRITE:
res_length = node.write((char const *)content, length, offset);
break;
case Packet_descriptor::READ_READY:
/* not supported */
break;
}
packet.length(res_length);

View File

@ -86,6 +86,10 @@ class File_system::Session_component : public Session_rpc_object
res_length = node.write((char const *)content, length, offset);
break;
case Packet_descriptor::READ_READY:
/* not supported */
break;
}
packet.length(res_length);

View File

@ -1,11 +1,13 @@
/*
* \brief File-system session interface
* \author Norman Feske
* \author Emery Hemingway
* \author Christian Helmuth
* \date 2012-04-05
*/
/*
* Copyright (C) 2012-2016 Genode Labs GmbH
* Copyright (C) 2012-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -117,7 +119,7 @@ class File_system::Packet_descriptor : public Genode::Packet_descriptor
{
public:
enum Opcode { READ, WRITE };
enum Opcode { READ, WRITE, READ_READY };
private:

View File

@ -77,6 +77,10 @@ class File_system::Session_component : public Session_rpc_object
case Packet_descriptor::WRITE:
res_length = node.write((char const *)content, length, offset);
break;
case Packet_descriptor::READ_READY:
/* not supported */
break;
}
packet.length(res_length);

View File

@ -83,6 +83,10 @@ class File_system::Session_component : public Session_rpc_object
case Packet_descriptor::WRITE:
res_length = node.write((char const *)content, length, offset);
break;
case Packet_descriptor::READ_READY:
/* not supported */
break;
}
packet.length(res_length);

View File

@ -668,6 +668,10 @@ class File_system::Session_component : public Session_rpc_object
case Packet_descriptor::WRITE:
res_length = node.write((char const *)content, length, offset);
break;
case Packet_descriptor::READ_READY:
/* not supported */
break;
}
packet.length(res_length);

View File

@ -1,11 +1,12 @@
/*
* \brief VFS File_system server
* \author Emery Hemingway
* \author Christian Helmuth
* \date 2015-08-16
*/
/*
* Copyright (C) 2015-2016 Genode Labs GmbH
* Copyright (C) 2015-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -139,6 +140,10 @@ class Vfs_server::Session_component :
res_length = node.write(_vfs, (char const *)content, length, seek);
}); } catch (...) { }
break;
case Packet_descriptor::READ_READY:
/* not supported */
break;
}
packet.length(res_length);