diff --git a/repos/os/include/block_session/block_session.h b/repos/os/include/block_session/block_session.h index b137223ccb..6adbbc1af2 100644 --- a/repos/os/include/block_session/block_session.h +++ b/repos/os/include/block_session/block_session.h @@ -162,6 +162,11 @@ struct Block::Session : public Genode::Session */ virtual Tx::Source *tx() { return 0; } + /** + * Return capability for packet-transmission channel + */ + virtual Genode::Capability tx_cap() = 0; + /******************* ** RPC interface ** @@ -169,7 +174,7 @@ struct Block::Session : public Genode::Session GENODE_RPC(Rpc_info, void, info, Block::sector_t *, Genode::size_t *, Operations *); - GENODE_RPC(Rpc_tx_cap, Genode::Capability, _tx_cap); + GENODE_RPC(Rpc_tx_cap, Genode::Capability, tx_cap); GENODE_RPC(Rpc_sync, void, sync); GENODE_RPC_INTERFACE(Rpc_info, Rpc_tx_cap, Rpc_sync); }; diff --git a/repos/os/include/block_session/client.h b/repos/os/include/block_session/client.h index 9b5bc74d44..633ffe15a4 100644 --- a/repos/os/include/block_session/client.h +++ b/repos/os/include/block_session/client.h @@ -41,7 +41,7 @@ class Block::Session_client : public Genode::Rpc_client Genode::Region_map &rm) : Genode::Rpc_client(session), - _tx(call(), rm, tx_buffer_alloc) + _tx(tx_cap(), rm, tx_buffer_alloc) { } @@ -56,9 +56,13 @@ class Block::Session_client : public Genode::Rpc_client } Tx *tx_channel() { return &_tx; } + Tx::Source *tx() { return _tx.source(); } + void sync() override { call(); } + Genode::Capability tx_cap() override { return call(); } + /* * Wrapper for alloc_packet, allocates 2KB aligned packets */ diff --git a/repos/os/include/block_session/rpc_object.h b/repos/os/include/block_session/rpc_object.h index 062672bde2..76b8168fc5 100644 --- a/repos/os/include/block_session/rpc_object.h +++ b/repos/os/include/block_session/rpc_object.h @@ -57,7 +57,7 @@ class Block::Session_rpc_object : public Genode::Rpc_object _tx_cap() { return _tx.cap(); } + Genode::Capability tx_cap() override { return _tx.cap(); } Tx::Sink *tx_sink() { return _tx.sink(); } };