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
46 lines
1.3 KiB
C++
46 lines
1.3 KiB
C++
/*
|
|
* \brief Device PD handling for the platform driver
|
|
* \author Alexander Boettcher
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2014-2017 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU Affero General Public License version 3.
|
|
*/
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <os/static_parent_services.h>
|
|
#include <os/slave.h>
|
|
|
|
enum { STACK_SIZE = 4 * sizeof(void *) * 1024 };
|
|
|
|
namespace Platform { class Device_pd_policy; }
|
|
|
|
class Platform::Device_pd_policy
|
|
:
|
|
private Genode::Static_parent_services<Genode::Ram_session,
|
|
Genode::Pd_session,
|
|
Genode::Cpu_session,
|
|
Genode::Log_session,
|
|
Genode::Rom_session>,
|
|
public Genode::Slave::Policy
|
|
{
|
|
public:
|
|
|
|
Device_pd_policy(Genode::Rpc_entrypoint &slave_ep,
|
|
Genode::Region_map &local_rm,
|
|
Genode::Ram_session &ram_ref,
|
|
Genode::Ram_session_capability ram_ref_cap,
|
|
Genode::Ram_quota ram_quota,
|
|
Genode::Session_label const &label)
|
|
:
|
|
Genode::Slave::Policy(label, "device_pd", *this, slave_ep, local_rm,
|
|
ram_ref, ram_ref_cap, ram_quota)
|
|
{ }
|
|
};
|
|
|