2011-12-22 16:19:25 +01:00
|
|
|
/*
|
2016-06-13 15:14:32 +02:00
|
|
|
* \brief Interface to obtain the parent capability for the component
|
2011-12-22 16:19:25 +01:00
|
|
|
* \author Norman Feske
|
2012-07-30 10:56:07 +02:00
|
|
|
* \author Alexander Boettcher
|
2011-12-22 16:19:25 +01:00
|
|
|
* \date 2010-01-26
|
|
|
|
*
|
|
|
|
* The parent portal is, by convention, capability selector 'PT_CAP_PARENT'
|
2012-07-30 10:56:07 +02:00
|
|
|
* supplied with the initial portals when the PD is created.
|
2011-12-22 16:19:25 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 13:23:52 +01:00
|
|
|
* Copyright (C) 2010-2017 Genode Labs GmbH
|
2011-12-22 16:19:25 +01:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 13:23:52 +01:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2011-12-22 16:19:25 +01:00
|
|
|
*/
|
|
|
|
|
2016-06-13 15:14:32 +02:00
|
|
|
#ifndef _INCLUDE__BASE__INTERNAL__PARENT_CAP_H_
|
|
|
|
#define _INCLUDE__BASE__INTERNAL__PARENT_CAP_H_
|
2011-12-22 16:19:25 +01:00
|
|
|
|
|
|
|
/* Genode includes */
|
2016-06-13 15:14:32 +02:00
|
|
|
#include <parent/capability.h>
|
2011-12-22 16:19:25 +01:00
|
|
|
|
|
|
|
/* NOVA includes */
|
2016-06-15 15:04:54 +02:00
|
|
|
#include <nova/capability_space.h>
|
2011-12-22 16:19:25 +01:00
|
|
|
|
2016-06-13 15:14:32 +02:00
|
|
|
|
2011-12-22 16:19:25 +01:00
|
|
|
namespace Genode {
|
|
|
|
|
2016-06-13 15:14:32 +02:00
|
|
|
static inline Parent_capability parent_cap()
|
2011-12-22 16:19:25 +01:00
|
|
|
{
|
2012-07-30 10:56:07 +02:00
|
|
|
return reinterpret_cap_cast<Parent>(
|
2016-06-15 15:04:54 +02:00
|
|
|
Capability_space::import(Nova::PT_SEL_PARENT));
|
2011-12-22 16:19:25 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-06-13 15:14:32 +02:00
|
|
|
#endif /* _INCLUDE__BASE__INTERNAL__PARENT_CAP_H_ */
|