diff --git a/repos/base/include/base/attached_dataspace.h b/repos/base/include/base/attached_dataspace.h index 8adaba4d48..98ef92b3dd 100644 --- a/repos/base/include/base/attached_dataspace.h +++ b/repos/base/include/base/attached_dataspace.h @@ -54,12 +54,6 @@ class Genode::Attached_dataspace : Noncopyable [&] (Region_map::Attach_error) { return nullptr; }); } - /* - * Noncopyable - */ - Attached_dataspace(Attached_dataspace const &); - Attached_dataspace &operator = (Attached_dataspace const &); - public: /** @@ -118,6 +112,11 @@ class Genode::Attached_dataspace : Noncopyable [&] (Region_map::Attach_error) { return 0UL; }); } + /** + * Return byte range of locally mapped dataspace + */ + Byte_range_ptr bytes() const { return { _ptr(), size() }; } + /** * Forget dataspace, thereby skipping the detachment on destruction * diff --git a/repos/base/include/base/attached_ram_dataspace.h b/repos/base/include/base/attached_ram_dataspace.h index f6b316ef94..b04c654c46 100644 --- a/repos/base/include/base/attached_ram_dataspace.h +++ b/repos/base/include/base/attached_ram_dataspace.h @@ -163,6 +163,11 @@ class Genode::Attached_ram_dataspace _alloc_and_attach(); } + + /** + * Return byte range of locally mapped dataspace + */ + Byte_range_ptr bytes() const { return { local_addr(), size() }; } }; #endif /* _INCLUDE__BASE__ATTACHED_RAM_DATASPACE_H_ */