diff --git a/os/include/file_system_session/client.h b/os/include/file_system_session/client.h index c3279a6c61..3c52caab5f 100644 --- a/os/include/file_system_session/client.h +++ b/os/include/file_system_session/client.h @@ -104,6 +104,11 @@ namespace File_system { { call(node, sigh); } + + void sync() + { + call(); + } }; } diff --git a/os/include/file_system_session/file_system_session.h b/os/include/file_system_session/file_system_session.h index 6bf0452eb3..fd647ec872 100644 --- a/os/include/file_system_session/file_system_session.h +++ b/os/include/file_system_session/file_system_session.h @@ -280,6 +280,15 @@ namespace File_system { */ virtual void sigh(Node_handle, Signal_context_capability sigh) = 0; + /** + * Synchronize file system + * + * This is only needed by file systems that maintain an internal + * cache, which needs to be flushed on certain occasions. Therefore, + * the default implementation just serves as a reminder. + */ + virtual void sync() { PWRN("sync() not implemented!"); } + /******************* ** RPC interface ** @@ -317,6 +326,7 @@ namespace File_system { GENODE_RPC_THROW(Rpc_sigh, void, sigh, GENODE_TYPE_LIST(Invalid_handle), Node_handle, Signal_context_capability); + GENODE_RPC(Rpc_sync, void, sync); /* * Manual type-list definition, needed because the RPC interface @@ -335,8 +345,9 @@ namespace File_system { Meta::Type_tuple - > > > > > > > > > > > Rpc_functions; + > > > > > > > > > > > > Rpc_functions; }; }