file_system_session: merge ack and submit sigh

Fixes #4388
This commit is contained in:
Norman Feske 2022-01-24 16:01:10 +01:00
parent 2591c61e7d
commit 11622fa038
5 changed files with 11 additions and 24 deletions

View File

@ -51,13 +51,9 @@ class File_system::Session_client : public Genode::Rpc_client<Session>
Tx::Source *tx() override { return _tx.source(); }
void sigh_ready_to_submit(Genode::Signal_context_capability sigh)
void sigh(Genode::Signal_context_capability sigh)
{
_tx.sigh_ready_to_submit(sigh);
}
void sigh_ack_avail(Genode::Signal_context_capability sigh)
{
_tx.sigh_ack_avail(sigh);
}

View File

@ -535,12 +535,6 @@ class Vfs::Fs_file_system : public File_system
return count;
}
void _ready_to_submit()
{
_congested_handles.dequeue_all([] (Fs_vfs_handle &handle) {
handle.io_progress_response(); });
}
void _handle_ack()
{
::File_system::Session::Tx::Source &source = *_fs.tx();
@ -616,19 +610,17 @@ class Vfs::Fs_file_system : public File_system
}
}
void _handle_ack_signal()
void _handle_signal()
{
_handle_ack();
/* packet buffer space available */
_ready_to_submit();
_congested_handles.dequeue_all([] (Fs_vfs_handle &handle) {
handle.io_progress_response(); });
}
Genode::Io_signal_handler<Fs_file_system> _ack_handler {
_env.env().ep(), *this, &Fs_file_system::_handle_ack_signal };
Genode::Io_signal_handler<Fs_file_system> _ready_handler {
_env.env().ep(), *this, &Fs_file_system::_ready_to_submit };
Genode::Io_signal_handler<Fs_file_system> _signal_handler {
_env.env().ep(), *this, &Fs_file_system::_handle_signal };
static size_t buffer_size(Genode::Xml_node const &config)
{
@ -648,8 +640,7 @@ class Vfs::Fs_file_system : public File_system
config.attribute_value("writeable", true),
buffer_size(config))
{
_fs.sigh_ack_avail(_ack_handler);
_fs.sigh_ready_to_submit(_ready_handler);
_fs.sigh(_signal_handler);
}
/*********************************

View File

@ -453,7 +453,7 @@ struct Cached_fs_rom::Main final : Genode::Session_request_handler
Main(Genode::Env &env) : env(env)
{
fs.sigh_ack_avail(packet_handler);
fs.sigh(packet_handler);
/* process any requests that have already queued */
session_requests.schedule();

View File

@ -542,7 +542,7 @@ class Fs_rom::Rom_root : public Root_component<Fs_rom::Rom_session_component>
_env(env)
{
/* Process CONTENT_CHANGED acknowledgement packets at the entrypoint */
_fs.sigh_ack_avail(_packet_handler);
_fs.sigh(_packet_handler);
env.parent().announce(env.ep().manage(*this));
}

View File

@ -63,7 +63,7 @@ struct Fs_packet::Main
Main(Genode::Env &env) : env(env)
{
fs.sigh_ack_avail(ack_handler);
fs.sigh(ack_handler);
/**********************
** Stuff the buffer **