From 9cf677cb0a00c9697f30fe278125fbdb3752adae Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Sat, 5 Oct 2013 15:19:37 +0200 Subject: [PATCH] os: Add resource balancing-support to 'Slave' In order to be able to dynamically balance resources of slaves, we need to provide an accessor to the slave's RAM session and a way to issue yield requests. --- os/include/os/slave.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/os/include/os/slave.h b/os/include/os/slave.h index 23f30730ec..10191659ac 100644 --- a/os/include/os/slave.h +++ b/os/include/os/slave.h @@ -185,6 +185,19 @@ namespace Genode { _resources.ram.cap(), _resources.cpu.cap(), _resources.rm.cap(), &entrypoint, &slave_policy) { } + + Genode::Ram_connection &ram() { return _resources.ram; } + + + /*************************************** + ** Wrappers of the 'Child' interface ** + ***************************************/ + + void yield(Genode::Parent::Resource_args const &args) { + _child.yield(args); } + + void notify_resource_avail() const { + _child.notify_resource_avail(); } }; }