]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/l4re/include/impl/rm_impl.h
update
[l4.git] / l4 / pkg / l4re / include / impl / rm_impl.h
index 9e8ab9111ba777e9544052512a184e5d74cecdcc..edc204732879c52e5446a7198e11c02da7b2ea71 100644 (file)
@@ -156,5 +156,26 @@ Rm::find(l4_addr_t *addr, unsigned long *size, unsigned long *offset,
   return err;
 }
 
+int
+Rm::get_regions(l4_addr_t start, Region **regions) throw()
+{
+  L4::Ipc_iostream io(l4_utcb());
+  io << Opcode(Rm_::Get_regions) << start;
+  long err = l4_error(io.call(cap(), L4Re::Protocol::Rm));
+  if (err > 0)
+    *regions = reinterpret_cast<Region*>(&l4_utcb_mr()->mr[0]);
+  return err;
+}
+
+int
+Rm::get_areas(l4_addr_t start, Area **areas) throw()
+{
+  L4::Ipc_iostream io(l4_utcb());
+  io << Opcode(Rm_::Get_areas) << start;
+  long err = l4_error(io.call(cap(), L4Re::Protocol::Rm));
+  if (err > 0)
+    *areas = reinterpret_cast<Area*>(&l4_utcb_mr()->mr[0]);
+  return err;
+}
 
 }