genode/repos/base-nova/src/include/base/internal/parent_cap.h

38 lines
918 B
C
Raw Normal View History

2011-12-22 16:19:25 +01:00
/*
* \brief Interface to obtain the parent capability for the component
2011-12-22 16:19:25 +01:00
* \author Norman Feske
* \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'
* supplied with the initial portals when the PD is created.
2011-12-22 16:19:25 +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
* under the terms of the GNU Affero General Public License version 3.
2011-12-22 16:19:25 +01: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 */
#include <parent/capability.h>
2011-12-22 16:19:25 +01:00
/* NOVA includes */
#include <nova/capability_space.h>
2011-12-22 16:19:25 +01:00
2011-12-22 16:19:25 +01:00
namespace Genode {
static inline Parent_capability parent_cap()
2011-12-22 16:19:25 +01:00
{
return reinterpret_cap_cast<Parent>(
Capability_space::import(Nova::PT_SEL_PARENT));
2011-12-22 16:19:25 +01:00
}
}
#endif /* _INCLUDE__BASE__INTERNAL__PARENT_CAP_H_ */