mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 01:36:22 +00:00
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:
parent
8185a49b4c
commit
b805e001db
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user