358380046c
Enable platform specific allocations and ram quota accounting for protection domains. Needed to allocate object identity references in the base-hw kernel when delegating capabilities via IPC. Moreover, it can be used to account translation table entries in the future. Ref #1443
61 lines
1.3 KiB
C++
61 lines
1.3 KiB
C++
/*
|
|
* \brief PD root interface
|
|
* \author Christian Helmuth
|
|
* \date 2006-07-17
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2006-2013 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU General Public License version 2.
|
|
*/
|
|
|
|
#ifndef _CORE__INCLUDE__PD_ROOT_H_
|
|
#define _CORE__INCLUDE__PD_ROOT_H_
|
|
|
|
/* Genode */
|
|
#include <root/component.h>
|
|
|
|
/* Core */
|
|
#include <pd_session_component.h>
|
|
|
|
namespace Genode {
|
|
class Pd_root;
|
|
}
|
|
|
|
|
|
class Genode::Pd_root
|
|
: public Genode::Root_component<Genode::Pd_session_component>
|
|
{
|
|
private:
|
|
|
|
Rpc_entrypoint *_thread_ep;
|
|
Allocator *_md_alloc;
|
|
|
|
protected:
|
|
|
|
Pd_session_component *_create_session(const char *args)
|
|
{
|
|
return new (md_alloc()) Pd_session_component(_thread_ep,
|
|
_md_alloc, args);
|
|
}
|
|
|
|
public:
|
|
|
|
/**
|
|
* Constructor
|
|
*
|
|
* \param session_ep entry point for managing pd session objects
|
|
* \param thread_ep entry point for managing threads
|
|
* \param md_alloc meta-data allocator to be used by root component
|
|
*/
|
|
Pd_root(Rpc_entrypoint *session_ep,
|
|
Rpc_entrypoint *thread_ep,
|
|
Allocator *md_alloc)
|
|
: Root_component<Pd_session_component>(session_ep, md_alloc),
|
|
_thread_ep(thread_ep), _md_alloc(md_alloc) { }
|
|
};
|
|
|
|
#endif /* _CORE__INCLUDE__PD_ROOT_H_ */
|