This patch establishes the sole use of generic headers across all kernels. The common 'native_capability.h' is based on the version of base-sel4. All traditional L4 kernels and Linux use the same implementation of the capability-lifetime management. On base-hw, NOVA, Fiasco.OC, and seL4, custom implementations (based on their original mechanisms) are used, with the potential to unify them further in the future. This change achieves binary compatibility of dynamically linked programs across all kernels. Furthermore, the patch introduces a Native_capability::print method, which allows the easy output of the kernel-specific capability representation using the base/log.h API. Issue #1993
29 lines
606 B
C++
29 lines
606 B
C++
/*
|
|
* \brief Capability
|
|
* \author Norman Feske
|
|
* \date 2016-06-16
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2016 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.
|
|
*/
|
|
|
|
#include <base/log.h>
|
|
|
|
/* base-internal includes */
|
|
#include <base/internal/capability_space_tpl.h>
|
|
|
|
using namespace Genode;
|
|
|
|
|
|
Native_capability::Raw Native_capability::raw() const
|
|
{
|
|
Capability_space::Ipc_cap_data const cap_data =
|
|
Capability_space::ipc_cap_data(*this);
|
|
|
|
return { { cap_data.dst.raw, cap_data.rpc_obj_key.value(), 0, 0 } };
|
|
}
|