Remove base/native_types.h headers

Issue #1993
This commit is contained in:
Norman Feske 2016-06-13 13:53:58 +02:00
parent d6ba00089b
commit f7bdd383e2
79 changed files with 324 additions and 310 deletions

View File

@ -1,5 +1,5 @@
/*
* \brief Native types on L4/Fiasco
* \brief Native capability type on L4/Fiasco
* \author Norman Feske
* \date 2008-07-26
*/
@ -11,11 +11,11 @@
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__BASE__NATIVE_TYPES_H_
#define _INCLUDE__BASE__NATIVE_TYPES_H_
#ifndef _INCLUDE__BASE__NATIVE_CAPABILITY_H_
#define _INCLUDE__BASE__NATIVE_CAPABILITY_H_
/* Genode includes */
#include <base/native_capability.h>
#include <base/native_capability_tpl.h>
#include <base/stdint.h>
namespace Fiasco {
@ -24,8 +24,6 @@ namespace Fiasco {
namespace Genode {
class Platform_thread;
struct Cap_dst_policy
{
typedef Fiasco::l4_threadid_t Dst;
@ -41,4 +39,4 @@ namespace Genode {
typedef Native_capability_tpl<Cap_dst_policy> Native_capability;
}
#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */
#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */

View File

@ -18,7 +18,7 @@
#include <base/cache.h>
#include <base/ipc.h>
#include <base/stdint.h>
#include <base/native_types.h>
#include <base/native_capability.h>
#include <util/touch.h>
/* base-internal includes */

View File

@ -15,7 +15,7 @@
#define _CORE__INCLUDE__PLATFORM_THREAD_H_
/* Genode includes */
#include <base/native_types.h>
#include <base/native_capability.h>
#include <base/thread_state.h>
/* core includes */

View File

@ -19,7 +19,7 @@
*/
/* Genode includes */
#include <base/native_types.h>
#include <base/native_capability.h>
/* core includes */
#include <util.h>

View File

@ -22,7 +22,11 @@ namespace Fiasco {
#include <l4/sys/types.h>
}
namespace Genode { struct Native_thread; }
namespace Genode {
struct Platform_thread;
struct Native_thread;
}
struct Genode::Native_thread
{

View File

@ -0,0 +1,113 @@
/*
* \brief Platform-specific capability type
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-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 _INCLUDE__BASE__NATIVE_CAPABILITY_H_
#define _INCLUDE__BASE__NATIVE_CAPABILITY_H_
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/types.h>
}
/* Genode includes */
#include <base/cap_map.h>
namespace Genode {
/**
* Native_capability in Fiasco.OC is just a reference to a Cap_index.
*
* As Cap_index objects cannot be copied around, but Native_capability
* have to, we have to use this indirection.
*/
class Native_capability
{
public:
typedef Fiasco::l4_cap_idx_t Dst;
struct Raw
{
Dst dst;
long local_name;
};
private:
Cap_index* _idx;
protected:
inline void _inc()
{
if (_idx)
_idx->inc();
}
inline void _dec()
{
if (_idx && !_idx->dec()) {
cap_map()->remove(_idx);
}
}
public:
/**
* Default constructor creates an invalid capability
*/
Native_capability() : _idx(0) { }
/**
* Construct capability manually
*/
Native_capability(Cap_index* idx)
: _idx(idx) { _inc(); }
Native_capability(const Native_capability &o)
: _idx(o._idx) { _inc(); }
~Native_capability() { _dec(); }
/**
* Return Cap_index object referenced by this object
*/
Cap_index* idx() const { return _idx; }
/**
* Overloaded comparision operator
*/
bool operator==(const Native_capability &o) const {
return _idx == o._idx; }
Native_capability& operator=(const Native_capability &o){
if (this == &o)
return *this;
_dec();
_idx = o._idx;
_inc();
return *this;
}
/*******************************************
** Interface provided by all platforms **
*******************************************/
long local_name() const { return _idx ? _idx->id() : 0; }
Dst dst() const { return _idx ? Dst(_idx->kcap()) : Dst(); }
bool valid() const { return (_idx != 0) && _idx->valid(); }
};
}
#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */

View File

@ -1,172 +0,0 @@
/*
* \brief Platform-specific type definitions
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-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 _INCLUDE__BASE__NATIVE_TYPES_H_
#define _INCLUDE__BASE__NATIVE_TYPES_H_
#include <base/cap_map.h>
namespace Fiasco {
#include <l4/sys/consts.h>
#include <l4/sys/types.h>
#include <l4/sys/utcb.h>
#include <l4/sys/task.h>
enum Cap_selectors {
/**********************************************
** Capability seclectors controlled by core **
**********************************************/
TASK_CAP = L4_BASE_TASK_CAP, /* use the same task cap selector
like L4Re for compatibility in
L4Linux */
/*
* To not clash with other L4Re cap selector constants (e.g.: L4Linux)
* leave the following selectors (2-7) empty
*/
PARENT_CAP = 0x8UL << L4_CAP_SHIFT, /* cap to parent session */
/*
* Each thread has a designated slot in the core controlled cap
* selector area, where its ipc gate capability (for server threads),
* its irq capability (for locks), and the capability to its pager
* gate are stored
*/
THREAD_AREA_BASE = 0x9UL << L4_CAP_SHIFT, /* offset to thread area */
THREAD_AREA_SLOT = 0x3UL << L4_CAP_SHIFT, /* size of one thread slot */
THREAD_GATE_CAP = 0, /* offset to the ipc gate
cap selector in the slot */
THREAD_PAGER_CAP = 0x1UL << L4_CAP_SHIFT, /* offset to the pager
cap selector in the slot */
THREAD_IRQ_CAP = 0x2UL << L4_CAP_SHIFT, /* offset to the irq cap
selector in the slot */
MAIN_THREAD_CAP = THREAD_AREA_BASE + THREAD_GATE_CAP, /* shortcut to the
main thread's
gate cap */
/*********************************************************
** Capability seclectors controlled by the task itself **
*********************************************************/
USER_BASE_CAP = 0x200UL << L4_CAP_SHIFT,
};
enum Utcb_regs {
UTCB_TCR_BADGE = 1,
UTCB_TCR_THREAD_OBJ = 2
};
struct Capability
{
static bool valid(l4_cap_idx_t idx) {
return !(idx & L4_INVALID_CAP_BIT) && idx != 0; }
};
}
namespace Genode {
typedef Fiasco::l4_cap_idx_t Native_task;
/**
* Native_capability in Fiasco.OC is just a reference to a Cap_index.
*
* As Cap_index objects cannot be copied around, but Native_capability
* have to, we have to use this indirection.
*/
class Native_capability
{
public:
typedef Fiasco::l4_cap_idx_t Dst;
struct Raw
{
Dst dst;
long local_name;
};
private:
Cap_index* _idx;
protected:
inline void _inc()
{
if (_idx)
_idx->inc();
}
inline void _dec()
{
if (_idx && !_idx->dec()) {
cap_map()->remove(_idx);
}
}
public:
/**
* Default constructor creates an invalid capability
*/
Native_capability() : _idx(0) { }
/**
* Construct capability manually
*/
Native_capability(Cap_index* idx)
: _idx(idx) { _inc(); }
Native_capability(const Native_capability &o)
: _idx(o._idx) { _inc(); }
~Native_capability() { _dec(); }
/**
* Return Cap_index object referenced by this object
*/
Cap_index* idx() const { return _idx; }
/**
* Overloaded comparision operator
*/
bool operator==(const Native_capability &o) const {
return _idx == o._idx; }
Native_capability& operator=(const Native_capability &o){
if (this == &o)
return *this;
_dec();
_idx = o._idx;
_inc();
return *this;
}
/*******************************************
** Interface provided by all platforms **
*******************************************/
long local_name() const { return _idx ? _idx->id() : 0; }
Dst dst() const { return _idx ? Dst(_idx->kcap()) : Dst(); }
bool valid() const { return (_idx != 0) && _idx->valid(); }
};
}
#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */

View File

@ -0,0 +1,73 @@
/*
* \brief Kernel-specific capability helpers and definitions
* \author Norman Feske
* \date 2016-06-01
*/
/*
* 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.
*/
#ifndef _INCLUDE__FOC__NATIVE_CAPABILITY_H_
#define _INCLUDE__FOC__NATIVE_CAPABILITY_H_
namespace Fiasco {
#include <l4/sys/consts.h>
#include <l4/sys/types.h>
#include <l4/sys/utcb.h>
#include <l4/sys/task.h>
enum Cap_selectors {
/*********************************************
** Capability selectors controlled by core **
*********************************************/
TASK_CAP = L4_BASE_TASK_CAP, /* use the same task cap selector
like L4Re for compatibility in
L4Linux */
/*
* To not clash with other L4Re cap selector constants (e.g.: L4Linux)
* leave the following selectors (2-7) empty
*/
PARENT_CAP = 0x8UL << L4_CAP_SHIFT, /* cap to parent session */
/*
* Each thread has a designated slot in the core controlled cap
* selector area, where its ipc gate capability (for server threads),
* its irq capability (for locks), and the capability to its pager
* gate are stored
*/
THREAD_AREA_BASE = 0x9UL << L4_CAP_SHIFT, /* offset to thread area */
THREAD_AREA_SLOT = 0x3UL << L4_CAP_SHIFT, /* size of one thread slot */
THREAD_GATE_CAP = 0, /* offset to the ipc gate
cap selector in the slot */
THREAD_PAGER_CAP = 0x1UL << L4_CAP_SHIFT, /* offset to the pager
cap selector in the slot */
THREAD_IRQ_CAP = 0x2UL << L4_CAP_SHIFT, /* offset to the irq cap
selector in the slot */
MAIN_THREAD_CAP = THREAD_AREA_BASE + THREAD_GATE_CAP, /* shortcut to the
main thread's
gate cap */
/*********************************************************
** Capability seclectors controlled by the task itself **
*********************************************************/
USER_BASE_CAP = 0x200UL << L4_CAP_SHIFT,
};
struct Capability
{
static bool valid(l4_cap_idx_t idx) {
return !(idx & L4_INVALID_CAP_BIT) && idx != 0; }
};
}
#endif /* _INCLUDE__FOC__NATIVE_CAPABILITY_H_ */

View File

@ -53,7 +53,7 @@ namespace Genode {
*
* \param task capability of task to map to
*/
void map(Native_task task);
void map(Fiasco::l4_cap_idx_t task);
};
}

View File

@ -19,9 +19,10 @@
#include <base/cache.h>
#include <base/ipc.h>
#include <base/stdint.h>
#include <base/native_types.h>
#include <base/native_capability.h>
#include <base/thread_state.h>
#include <util/touch.h>
#include <foc/native_capability.h>
/* base-internal includes */
#include <base/internal/native_thread.h>

View File

@ -16,7 +16,7 @@
#define _CORE__INCLUDE__PLATFORM_THREAD_H_
/* Genode includes */
#include <base/native_types.h>
#include <base/native_capability.h>
#include <base/thread_state.h>
/* core includes */

View File

@ -15,9 +15,13 @@
#include <base/printf.h>
#include <base/thread.h>
/* Core includes */
/* core includes */
#include <ipc_pager.h>
/* base-internal includes */
#include <base/internal/native_utcb.h>
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/ipc.h>
}

View File

@ -13,7 +13,7 @@
*/
/* Genode includes */
#include <base/native_types.h>
#include <base/native_capability.h>
#include <util/misc_math.h>
/* core includes */

View File

@ -14,7 +14,6 @@
/* Genode includes */
#include <base/capability.h>
#include <base/cap_alloc.h>
#include <util/misc_math.h>
/* core includes */
@ -23,6 +22,10 @@
#include <cap_index.h>
#include <platform.h>
/* base-internal includes */
#include <base/internal/cap_alloc.h>
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/consts.h>
#include <l4/sys/debugger.h>

View File

@ -14,7 +14,7 @@
/* Genode includes */
#include <base/printf.h>
#include <base/native_types.h>
#include <base/native_capability.h>
/* core includes */
#include <platform.h>

View File

@ -15,9 +15,10 @@
#define _INCLUDE__BASE__CAP_ALLOC_H_
#include <base/cap_map.h>
#include <base/native_types.h>
#include <base/native_capability.h>
#include <util/assert.h>
#include <util/construct_at.h>
#include <foc/native_capability.h>
namespace Genode {

View File

@ -19,8 +19,8 @@
#define _INCLUDE__BASE__INTERNAL__LOCK_HELPER_H_
/* Genode includes */
#include <base/native_types.h>
#include <base/thread.h>
#include <foc/native_capability.h>
/* base-internal includes */
#include <base/internal/native_thread.h>

View File

@ -20,6 +20,11 @@
namespace Fiasco {
#include <l4/sys/utcb.h>
enum Utcb_regs {
UTCB_TCR_BADGE = 1,
UTCB_TCR_THREAD_OBJ = 2
};
}
namespace Genode { struct Native_utcb; }

View File

@ -15,7 +15,8 @@
#define _INCLUDE__STARTUP__INTERNAL___MAIN_PARENT_CAP_H_
/* Genode includes */
#include <base/native_types.h>
#include <base/native_capability.h>
#include <foc/native_capability.h>
/* base-internal includes */
#include <base/internal/crt0.h>

View File

@ -11,7 +11,7 @@
* under the terms of the GNU General Public License version 2.
*/
#include <base/cap_alloc.h>
#include <base/internal/cap_alloc.h>
Genode::Cap_index_allocator* Genode::cap_idx_alloc()
{

View File

@ -15,7 +15,7 @@
/* Genode includes */
#include <base/cap_map.h>
#include <base/native_types.h>
#include <base/native_capability.h>
#include <util/assert.h>

View File

@ -31,6 +31,7 @@
/* base-internal includes */
#include <base/internal/lock_helper.h> /* for 'thread_get_my_native_id()' */
#include <base/internal/ipc_server.h>
#include <base/internal/native_utcb.h>
/* Fiasco.OC includes */
namespace Fiasco {

View File

@ -16,6 +16,10 @@
#include <util/construct_at.h>
#include <base/thread.h>
#include <base/sleep.h>
#include <foc/native_capability.h>
/* base-internal includes */
#include <base/internal/native_utcb.h>
/*****************************

View File

@ -11,8 +11,12 @@
* under the terms of the GNU General Public License version 2.
*/
/* Genode includes */
#include <base/thread.h>
/* base-internal includes */
#include <base/internal/native_utcb.h>
Genode::Thread *Genode::Thread::myself()
{

View File

@ -19,10 +19,12 @@
#include <base/sleep.h>
#include <base/env.h>
#include <cpu_thread/client.h>
#include <foc/native_capability.h>
/* base-internal includes */
#include <base/internal/stack.h>
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/utcb.h>
}

View File

@ -1,20 +0,0 @@
/*
* \brief Basic Genode types
* \author Martin Stein
* \author Stefan Kalkowski
* \date 2012-01-02
*/
/*
* Copyright (C) 2012-2015 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 _INCLUDE__BASE__NATIVE_TYPES_H_
#define _INCLUDE__BASE__NATIVE_TYPES_H_
#include <base/native_capability.h>
#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */

View File

@ -12,7 +12,10 @@
*/
/* Genode includes */
#include <base/native_env.h>
#include <assert.h>
/* base-internal includes */
#include <base/internal/native_env.h>
void Genode::upgrade_pd_session_quota(Genode::size_t quota) { assert(false); }

View File

@ -16,7 +16,6 @@
#define _CORE__INCLUDE__KERNEL__IRQ_H_
/* Genode includes */
#include <base/native_types.h>
#include <irq_session/irq_session.h>
#include <util/avl_tree.h>

View File

@ -14,7 +14,7 @@
#ifndef _CORE__INCLUDE__OBJECT_H_
#define _CORE__INCLUDE__OBJECT_H_
#include <base/native_types.h>
#include <base/capability.h>
#include <kernel/interface.h>
#include <kernel/object.h>
#include <util/construct_at.h>

View File

@ -17,7 +17,6 @@
/* Genode includes */
#include <ram_session/ram_session.h>
#include <base/native_types.h>
#include <base/thread.h>
/* base-internal includes */

View File

@ -23,7 +23,6 @@
/* base includes */
#include <base/internal/unmanaged_singleton.h>
#include <base/native_types.h>
using namespace Kernel;

View File

@ -14,7 +14,6 @@
/* Genode includes */
#include <util/string.h>
#include <base/native_types.h>
/* base-internal includes */
#include <base/internal/native_utcb.h>

View File

@ -15,7 +15,6 @@
#define _INCLUDE__BASE__INTERNAL__LOCK_HELPER_H_
/* Genode includes */
#include <base/native_types.h>
#include <base/thread.h>
namespace Hw {

View File

@ -11,8 +11,8 @@
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__BASE__NATIVE_ENV_H_
#define _INCLUDE__BASE__NATIVE_ENV_H_
#ifndef _INCLUDE__BASE__INTERNAL__NATIVE_ENV_H_
#define _INCLUDE__BASE__INTERNAL__NATIVE_ENV_H_
/* Genode includes */
#include <base/stdint.h>
@ -25,4 +25,4 @@ namespace Genode
void upgrade_pd_session_quota(Genode::size_t);
};
#endif /* _INCLUDE__BASE__NATIVE_ENV_H_ */
#endif /* _INCLUDE__BASE__INTERNAL__NATIVE_ENV_H_ */

View File

@ -14,7 +14,9 @@
/* Genode includes */
#include <pd_session/client.h>
#include <base/env.h>
#include <base/native_env.h>
/* base-internal includes */
#include <base/internal/native_env.h>
void Genode::upgrade_pd_session_quota(Genode::size_t quota)

View File

@ -17,7 +17,6 @@
#include <base/ipc.h>
#include <base/allocator.h>
#include <base/thread.h>
#include <base/native_env.h>
#include <util/construct_at.h>
#include <util/retry.h>
@ -25,6 +24,7 @@
#include <base/internal/native_utcb.h>
#include <base/internal/native_thread.h>
#include <base/internal/ipc_server.h>
#include <base/internal/native_env.h>
/* base-hw includes */
#include <kernel/interface.h>

View File

@ -1,5 +1,5 @@
/*
* \brief Native types
* \brief Native capability type
* \author Norman Feske
* \date 2007-10-15
*/
@ -11,11 +11,11 @@
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__BASE__NATIVE_TYPES_H_
#define _INCLUDE__BASE__NATIVE_TYPES_H_
#ifndef _INCLUDE__BASE__NATIVE_CAPABILITY_H_
#define _INCLUDE__BASE__NATIVE_CAPABILITY_H_
#include <util/string.h>
#include <base/native_capability.h>
#include <base/native_capability_tpl.h>
#include <base/stdint.h>
namespace Genode {
@ -40,8 +40,6 @@ namespace Genode {
};
typedef Native_capability_tpl<Cap_dst_policy> Native_capability;
enum { PARENT_SOCKET_HANDLE = 100 };
}
#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */
#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */

View File

@ -20,6 +20,9 @@
#include <pd_session_component.h>
#include <dataspace_component.h>
/* base-internal includes */
#include <base/internal/parent_socket_handle.h>
/* Linux includes */
#include <core_linux_syscalls.h>

View File

@ -17,6 +17,7 @@
/* base-internal includes */
#include <base/internal/native_thread.h>
#include <base/internal/parent_socket_handle.h>
/* local includes */
#include "platform.h"

View File

@ -21,7 +21,6 @@
#define _INCLUDE__BASE__INTERNAL__LOCK_HELPER_H_
/* Genode includes */
#include <base/native_types.h>
#include <base/thread.h>
/* Linux includes */

View File

@ -0,0 +1,19 @@
/*
* \brief Socket handle that refers to the component's parent
* \author Norman Feske
* \date 2016-06-13
*/
/*
* 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.
*/
#ifndef _INCLUDE__BASE__INTERNAL__PARENT_SOCKET_HANDLE_H_
#define _INCLUDE__BASE__INTERNAL__PARENT_SOCKET_HANDLE_H_
namespace Genode { enum { PARENT_SOCKET_HANDLE = 100 }; }
#endif /* _INCLUDE__BASE__INTERNAL__PARENT_SOCKET_HANDLE_H_ */

View File

@ -21,6 +21,7 @@
#include <base/internal/platform_env.h>
#include <base/internal/native_thread.h>
#include <base/internal/globals.h>
#include <base/internal/parent_socket_handle.h>
using namespace Genode;

View File

@ -1,5 +1,5 @@
/*
* \brief Platform-specific type definitions
* \brief Platform-specific capability type
* \author Norman Feske
* \author Alexander Boettcher
* \date 2009-10-02
@ -12,11 +12,10 @@
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__BASE__NATIVE_TYPES_H_
#define _INCLUDE__BASE__NATIVE_TYPES_H_
#ifndef _INCLUDE__BASE__NATIVE_CAPABILITY_H_
/* Genode includes */
#include <base/native_capability.h>
#include <base/native_capability_tpl.h>
#include <base/stdint.h>
#include <base/cap_map.h>
@ -173,4 +172,4 @@ namespace Genode {
};
}
#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */
#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */

View File

@ -18,7 +18,6 @@
#include <base/cache.h>
#include <base/ipc.h>
#include <base/stdint.h>
#include <base/native_types.h>
#include <base/printf.h>
/* NOVA includes */

View File

@ -18,7 +18,6 @@
/* Genode includes */
#include <thread/capability.h>
#include <base/thread_state.h>
#include <base/native_types.h>
#include <base/thread.h>
/* base-internal includes */

View File

@ -19,7 +19,6 @@
#define _INCLUDE__BASE__INTERNAL__LOCK_HELPER_H_
/* Genode includes */
#include <base/native_types.h>
#include <base/thread.h>
#include <base/stdint.h>

View File

@ -1,5 +1,5 @@
/*
* \brief Native types on OKL4
* \brief Native capability type
* \author Norman Feske
* \date 2008-07-26
*/
@ -11,10 +11,10 @@
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__BASE__NATIVE_TYPES_H_
#define _INCLUDE__BASE__NATIVE_TYPES_H_
#ifndef _INCLUDE__BASE__NATIVE_CAPABILITY_H_
#define _INCLUDE__BASE__NATIVE_CAPABILITY_H_
#include <base/native_capability.h>
#include <base/native_capability_tpl.h>
#include <base/stdint.h>
namespace Okl4 { extern "C" {
@ -23,13 +23,6 @@ namespace Okl4 { extern "C" {
namespace Genode {
/**
* Index of the UTCB's thread word used for storing the own global
* thread ID
*/
enum { UTCB_TCR_THREAD_WORD_MYSELF = 0 };
struct Cap_dst_policy
{
typedef Okl4::L4_ThreadId_t Dst;
@ -41,4 +34,4 @@ namespace Genode {
typedef Native_capability_tpl<Cap_dst_policy> Native_capability;
}
#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */
#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */

View File

@ -17,7 +17,6 @@
#include <base/cache.h>
#include <base/ipc.h>
#include <base/stdint.h>
#include <base/native_types.h>
namespace Okl4 { extern "C" {
#include <l4/types.h>

View File

@ -16,7 +16,6 @@
/* Genode includes */
#include <base/thread_state.h>
#include <base/native_types.h>
/* core includes */
#include <pager.h>

View File

@ -15,7 +15,6 @@
#define _CORE__INCLUDE__UTIL_H_
/* Genode includes */
#include <base/native_types.h>
#include <rm_session/rm_session.h>
#include <base/stdint.h>
#include <base/printf.h>

View File

@ -20,6 +20,9 @@
#include <irq_root.h>
#include <irq_session_component.h>
/* base-internal includes */
#include <base/internal/native_utcb.h>
/* OKL4 includes */
namespace Okl4 { extern "C" {
#include <l4/thread.h>

View File

@ -21,6 +21,7 @@
/* base-internal includes */
#include <base/internal/native_thread.h>
#include <base/internal/native_utcb.h>
namespace Okl4 { extern "C" {
#include <l4/message.h>

View File

@ -20,6 +20,7 @@
/* base-internal includes */
#include <base/internal/crt0.h>
#include <base/internal/stack_area.h>
#include <base/internal/native_utcb.h>
/* core includes */
#include <core_parent.h>

View File

@ -18,7 +18,6 @@
#define _INCLUDE__BASE__INTERNAL__LOCK_HELPER_H_
/* Genode includes */
#include <base/native_types.h>
#include <base/thread.h>
/* OKL4 includes */

View File

@ -17,7 +17,16 @@
#ifndef _INCLUDE__BASE__INTERNAL__NATIVE_UTCB_H_
#define _INCLUDE__BASE__INTERNAL__NATIVE_UTCB_H_
namespace Genode { struct Native_utcb { }; }
namespace Genode {
/**
* Index of the UTCB's thread word used for storing the own global
* thread ID
*/
enum { UTCB_TCR_THREAD_WORD_MYSELF = 0 };
struct Native_utcb { };
}
#endif /* _INCLUDE__BASE__INTERNAL__NATIVE_UTCB_H_ */

View File

@ -14,11 +14,11 @@
/* Genode includes */
#include <base/printf.h>
#include <base/ipc.h>
#include <base/native_types.h>
#include <base/blocking.h>
/* base-internal includes */
#include <base/internal/ipc_server.h>
#include <base/internal/native_utcb.h>
/* OKL4 includes */
namespace Okl4 { extern "C" {

View File

@ -18,6 +18,7 @@
/* base-internal includes */
#include <base/internal/native_thread.h>
#include <base/internal/native_utcb.h>
/* OKL4 includes */
namespace Okl4 { extern "C" {

View File

@ -1,5 +1,5 @@
/*
* \brief Native types on Pistachio
* \brief Native capability type on Pistachio
* \author Norman Feske
* \date 2008-07-26
*/
@ -11,10 +11,10 @@
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__BASE__NATIVE_TYPES_H_
#define _INCLUDE__BASE__NATIVE_TYPES_H_
#ifndef _INCLUDE__BASE__NATIVE_CAPABILITY_H_
#define _INCLUDE__BASE__NATIVE_CAPABILITY_H_
#include <base/native_capability.h>
#include <base/native_capability_tpl.h>
#include <base/stdint.h>
namespace Pistachio {
@ -38,4 +38,4 @@ namespace Genode {
typedef Native_capability_tpl<Cap_dst_policy> Native_capability;
}
#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */
#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */

View File

@ -16,7 +16,6 @@
/* Genode includes */
#include <base/cache.h>
#include <base/native_types.h>
#include <base/ipc.h>
#include <base/stdint.h>
#include <util/touch.h>

View File

@ -15,7 +15,7 @@
#define _CORE__INCLUDE__PLATFORM_THREAD_H_
/* Genode includes */
#include <base/native_types.h>
#include <base/native_capability.h>
#include <base/thread_state.h>
/* core includes */

View File

@ -19,7 +19,6 @@
#include <base/printf.h>
#include <rm_session/rm_session.h>
#include <util/touch.h>
#include <base/native_types.h>
/* base-internal includes */
#include <base/internal/page_size.h>

View File

@ -18,7 +18,6 @@
#define _INCLUDE__BASE__INTERNAL__LOCK_HELPER_H_
/* Genode includes */
#include <base/native_types.h>
#include <base/thread.h>
/* Pistachio includes */

View File

@ -1,5 +1,5 @@
/*
* \brief Platform-specific type definitions
* \brief Platform-specific capability type
* \author Norman Feske
* \date 2014-10-14
*/
@ -11,11 +11,10 @@
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__BASE__NATIVE_TYPES_H_
#define _INCLUDE__BASE__NATIVE_TYPES_H_
#ifndef _INCLUDE__BASE__NATIVE_CAPABILITY_H_
#define _INCLUDE__BASE__NATIVE_CAPABILITY_H_
#include <base/stdint.h>
#include <base/native_capability.h>
namespace Genode {
@ -100,4 +99,4 @@ namespace Genode {
};
}
#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */
#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */

View File

@ -12,7 +12,7 @@
*/
/* base includes */
#include <base/native_types.h>
#include <base/capability.h>
#include <base/printf.h>
/* base-internal includes */

View File

@ -17,7 +17,6 @@
#include <base/cache.h>
#include <base/ipc.h>
#include <base/stdint.h>
#include <base/native_types.h>
namespace Genode {

View File

@ -16,7 +16,6 @@
/* Genode includes */
#include <base/thread_state.h>
#include <base/native_types.h>
#include <util/string.h>
/* core includes */

View File

@ -19,7 +19,6 @@
#define _INCLUDE__BASE__INTERNAL__CAPABILITY_SPACE_H_
/* Genode includes */
#include <base/native_types.h>
#include <base/thread.h>
/* base-internal includes */

View File

@ -1,20 +0,0 @@
/*
* \brief Platform-specific type and parameter definitions
* \author Norman Feske
* \date 2015-05-06
*/
/*
* Copyright (C) 2015 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 _INCLUDE__BASE__INTERNAL__NATIVE_TYPES_H_
#define _INCLUDE__BASE__INTERNAL__NATIVE_TYPES_H_
/* Genode includes */
#include <base/native_types.h>
#endif /* _INCLUDE__BASE__INTERNAL__NATIVE_TYPES_H_ */

View File

@ -15,7 +15,6 @@
#include <base/printf.h>
/* base-internal includes */
#include <base/internal/native_types.h>
#include <base/internal/capability_space.h>
using namespace Genode;

View File

@ -12,7 +12,7 @@
*/
/* base includes */
#include <base/native_types.h>
#include <base/capability.h>
#include <base/printf.h>
#include <util/bit_allocator.h>

View File

@ -18,7 +18,7 @@
#include <util/string.h>
#include <base/rpc.h>
#include <base/native_types.h>
#include <base/native_capability.h>
namespace Genode {

View File

@ -15,7 +15,6 @@
#define _INCLUDE__BASE__IPC_MSGBUF_H_
#include <util/noncopyable.h>
#include <base/native_types.h>
#include <base/capability.h>
#include <base/exception.h>
#include <base/rpc_args.h>

View File

@ -15,8 +15,8 @@
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__BASE__NATIVE_CAPABILITY_H_
#define _INCLUDE__BASE__NATIVE_CAPABILITY_H_
#ifndef _INCLUDE__BASE__NATIVE_CAPABILITY_TPL_H_
#define _INCLUDE__BASE__NATIVE_CAPABILITY_TPL_H_
namespace Genode { template <typename> class Native_capability_tpl; }
@ -115,4 +115,4 @@ class Genode::Native_capability_tpl
Dst dst() const { return _dst; }
};
#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */
#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_TPL_H_ */

View File

@ -55,7 +55,6 @@
/* Genode includes */
#include <base/thread.h>
#include <base/native_types.h> /* for 'Native_utcb' */
#include <cpu/consts.h>
#include <ram_session/ram_session.h> /* for 'Ram_dataspace_capability' type */
#include <cpu_session/cpu_session.h> /* for 'Cpu_session::Name' type */

View File

@ -12,7 +12,7 @@
*/
#include <util/string.h>
#include <base/native_types.h>
#include <base/native_capability.h>
using namespace Genode;

View File

@ -22,6 +22,7 @@
namespace Fiasco {
#include <l4/sys/types.h>
#include <l4/sys/consts.h>
#include <l4/sys/task.h>
}
namespace L4lx {

View File

@ -14,6 +14,7 @@
/* Genode includes */
#include <base/printf.h>
#include <cpu_session/connection.h>
#include <foc/native_capability.h>
#include <env.h>
#include <vcpu.h>

View File

@ -14,13 +14,13 @@
/* Genode includes */
#include <base/env.h>
#include <base/thread.h>
#include <base/native_types.h>
#include <dataspace/client.h>
#include <rom_session/connection.h>
#include <cpu_session/connection.h>
#include <util/misc_math.h>
#include <os/config.h>
#include <foc_native_cpu/client.h>
#include <foc/native_capability.h>
/* L4lx includes */
#include <env.h>

View File

@ -35,7 +35,6 @@
#include <util/touch.h>
#include <base/sleep.h>
#include <base/rpc_server.h>
#include <base/native_types.h>
#include <util/misc_math.h>
#include <rom_session/connection.h>
#include <rm_session/connection.h>