base: use 'Quota_transfer::Account' for 'Service'

This patch makes use of the new 'Quota_transfer::Account' by the service
types in base/service.h and uses 'Quota_transfer' objects in
base/child.cc and init/server.cc.

Furthermore, it decouples the notion of an 'Async_service' from
'Child_service'. Init's 'Routed_service' is no longer a 'Child_service'
but is based on the new 'Async_service' instead.

With this patch in place, quota transfers do no longer implicitly use
'Ram_session_client' objects. So transfers can in principle originate
from component-local 'Ram_session_component' objects, e.g., as used by
noux. Therefore, this patch removes a strumbling block for turning noux
into a single threaded component in the future.

Issue #2398
This commit is contained in:
Norman Feske
2017-05-08 16:49:00 +02:00
committed by Christian Helmuth
parent 5c43074bc6
commit 3670f7735d
19 changed files with 281 additions and 233 deletions

View File

@ -34,7 +34,7 @@ class Launchpad;
class Launchpad_child : public Genode::Child_policy,
public Genode::List<Launchpad_child>::Element,
public Genode::Child_service::Wakeup
public Genode::Async_service::Wakeup
{
public:
@ -75,7 +75,7 @@ class Launchpad_child : public Genode::Child_policy,
/**
* Child_service::Wakeup callback
*/
void wakeup_child_service() override
void wakeup_async_service() override
{
_session_requester.trigger_update();
}
@ -133,8 +133,7 @@ class Launchpad_child : public Genode::Child_policy,
Binary_name binary_name() const override { return _elf_name; }
Genode::Ram_session &ref_ram() override { return _ref_ram; }
Genode::Ram_session &ref_ram() override { return _ref_ram; }
Genode::Ram_session_capability ref_ram_cap() const override { return _ref_ram_cap; }
void init(Genode::Ram_session &session,
@ -198,9 +197,10 @@ class Launchpad_child : public Genode::Child_policy,
}
new (_alloc)
Child_service(_child_services, _session_requester.id_space(),
_child.session_factory(), service_name,
_child.ram_session_cap(), *this);
Child_service(_child_services, service_name,
_session_requester.id_space(),
_child.session_factory(), *this,
_child.ram_session_cap());
}
};