os: add Attached_rom_dataspace::cap accessor

The accessor works analogously to the Attached_dataspace.
This commit is contained in:
Norman Feske 2016-01-18 14:45:14 +01:00 committed by Christian Helmuth
parent f539cf1231
commit 900c795df2
1 changed files with 5 additions and 0 deletions

View File

@ -69,6 +69,11 @@ class Genode::Attached_rom_dataspace
Attached_rom_dataspace(char const *name)
: _rom(name) { _try_attach(); }
/**
* Return capability of the used dataspace
*/
Dataspace_capability cap() const { return _ds->cap(); }
template <typename T> T *local_addr() { return _ds->local_addr<T>(); }
size_t size() const { return _ds->size(); }