From f7bdd383e22797caa21233c42782c807794fb831 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 13 Jun 2016 13:53:58 +0200 Subject: [PATCH] Remove base/native_types.h headers Issue #1993 --- .../{native_types.h => native_capability.h} | 12 +- .../base-fiasco/src/core/include/ipc_pager.h | 2 +- .../src/core/include/platform_thread.h | 2 +- repos/base-fiasco/src/core/platform_pd.cc | 2 +- .../src/include/base/internal/native_thread.h | 6 +- .../base-foc/include/base/native_capability.h | 113 ++++++++++++ repos/base-foc/include/base/native_types.h | 172 ------------------ .../base-foc/include/foc/native_capability.h | 73 ++++++++ repos/base-foc/src/core/include/cap_mapping.h | 2 +- repos/base-foc/src/core/include/ipc_pager.h | 3 +- .../src/core/include/platform_thread.h | 2 +- repos/base-foc/src/core/ipc_pager.cc | 6 +- repos/base-foc/src/core/platform_pd.cc | 2 +- repos/base-foc/src/core/rpc_cap_factory.cc | 5 +- .../src/core/signal_source_component.cc | 2 +- .../include/base/internal}/cap_alloc.h | 3 +- .../src/include/base/internal/lock_helper.h | 2 +- .../src/include/base/internal/native_utcb.h | 5 + .../startup/internal/_main_parent_cap.h | 3 +- repos/base-foc/src/lib/base/cap_alloc.cc | 2 +- repos/base-foc/src/lib/base/cap_map.cc | 2 +- repos/base-foc/src/lib/base/ipc.cc | 1 + .../base-foc/src/lib/base/thread_bootstrap.cc | 4 + repos/base-foc/src/lib/base/thread_myself.cc | 4 + repos/base-foc/src/lib/base/thread_start.cc | 2 + repos/base-hw/include/base/native_types.h | 20 -- repos/base-hw/src/core/env.cc | 5 +- repos/base-hw/src/core/include/kernel/irq.h | 1 - repos/base-hw/src/core/include/object.h | 2 +- .../src/core/include/platform_thread.h | 1 - repos/base-hw/src/core/kernel/init.cc | 1 - repos/base-hw/src/core/kernel/ipc_node.cc | 1 - .../src/include/base/internal/lock_helper.h | 1 - .../include/base/internal}/native_env.h | 6 +- repos/base-hw/src/lib/base/env.cc | 4 +- repos/base-hw/src/lib/base/ipc.cc | 2 +- .../{native_types.h => native_capability.h} | 12 +- .../src/core/native_pd_component.cc | 3 + repos/base-linux/src/core/platform.cc | 1 + .../src/include/base/internal/lock_helper.h | 1 - .../base/internal/parent_socket_handle.h | 19 ++ repos/base-linux/src/lib/base/platform_env.cc | 1 + .../{native_types.h => native_capability.h} | 9 +- repos/base-nova/src/core/include/ipc_pager.h | 1 - .../src/core/include/platform_thread.h | 1 - .../src/include/base/internal/lock_helper.h | 1 - .../{native_types.h => native_capability.h} | 17 +- repos/base-okl4/src/core/include/ipc_pager.h | 1 - .../src/core/include/platform_thread.h | 1 - repos/base-okl4/src/core/include/util.h | 1 - .../src/core/irq_session_component.cc | 3 + repos/base-okl4/src/core/pager.cc | 1 + repos/base-okl4/src/core/platform.cc | 1 + .../src/include/base/internal/lock_helper.h | 1 - .../src/include/base/internal/native_utcb.h | 11 +- repos/base-okl4/src/lib/base/ipc.cc | 2 +- .../src/lib/base/thread_bootstrap.cc | 1 + .../{native_types.h => native_capability.h} | 10 +- .../src/core/include/ipc_pager.h | 1 - .../src/core/include/platform_thread.h | 2 +- repos/base-pistachio/src/core/include/util.h | 1 - .../src/include/base/internal/lock_helper.h | 1 - .../{native_types.h => native_capability.h} | 9 +- repos/base-sel4/src/core/capability_space.cc | 2 +- repos/base-sel4/src/core/include/ipc_pager.h | 1 - .../src/core/include/platform_thread.h | 1 - .../include/base/internal/capability_space.h | 1 - .../src/include/base/internal/native_types.h | 20 -- repos/base-sel4/src/lib/base/capability.cc | 1 - .../src/lib/base/capability_space.cc | 2 +- repos/base/include/base/capability.h | 2 +- repos/base/include/base/ipc_msgbuf.h | 1 - ...e_capability.h => native_capability_tpl.h} | 6 +- repos/base/src/include/base/internal/stack.h | 1 - repos/base/src/lib/startup/cap_copy.cc | 2 +- repos/ports-foc/src/lib/l4lx/include/task.h | 1 + repos/ports-foc/src/lib/l4lx/l4lx_thread.cc | 1 + repos/ports-foc/src/lib/l4lx/startup.cc | 2 +- repos/ports/src/app/seoul/main.cc | 1 - 79 files changed, 324 insertions(+), 310 deletions(-) rename repos/base-fiasco/include/base/{native_types.h => native_capability.h} (76%) create mode 100644 repos/base-foc/include/base/native_capability.h delete mode 100644 repos/base-foc/include/base/native_types.h create mode 100644 repos/base-foc/include/foc/native_capability.h rename repos/base-foc/{include/base => src/include/base/internal}/cap_alloc.h (97%) delete mode 100644 repos/base-hw/include/base/native_types.h rename repos/base-hw/{include/base => src/include/base/internal}/native_env.h (76%) rename repos/base-linux/include/base/{native_types.h => native_capability.h} (77%) create mode 100644 repos/base-linux/src/include/base/internal/parent_socket_handle.h rename repos/base-nova/include/base/{native_types.h => native_capability.h} (93%) rename repos/base-okl4/include/base/{native_types.h => native_capability.h} (67%) rename repos/base-pistachio/include/base/{native_types.h => native_capability.h} (75%) rename repos/base-sel4/include/base/{native_types.h => native_capability.h} (88%) delete mode 100644 repos/base-sel4/src/include/base/internal/native_types.h rename repos/base/include/base/{native_capability.h => native_capability_tpl.h} (95%) diff --git a/repos/base-fiasco/include/base/native_types.h b/repos/base-fiasco/include/base/native_capability.h similarity index 76% rename from repos/base-fiasco/include/base/native_types.h rename to repos/base-fiasco/include/base/native_capability.h index 86e1a01c7..ef9537d60 100644 --- a/repos/base-fiasco/include/base/native_types.h +++ b/repos/base-fiasco/include/base/native_capability.h @@ -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 +#include #include 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 Native_capability; } -#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */ +#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */ diff --git a/repos/base-fiasco/src/core/include/ipc_pager.h b/repos/base-fiasco/src/core/include/ipc_pager.h index 3a2a68638..dc9267cd4 100644 --- a/repos/base-fiasco/src/core/include/ipc_pager.h +++ b/repos/base-fiasco/src/core/include/ipc_pager.h @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include /* base-internal includes */ diff --git a/repos/base-fiasco/src/core/include/platform_thread.h b/repos/base-fiasco/src/core/include/platform_thread.h index 02da9255c..5b8094c85 100644 --- a/repos/base-fiasco/src/core/include/platform_thread.h +++ b/repos/base-fiasco/src/core/include/platform_thread.h @@ -15,7 +15,7 @@ #define _CORE__INCLUDE__PLATFORM_THREAD_H_ /* Genode includes */ -#include +#include #include /* core includes */ diff --git a/repos/base-fiasco/src/core/platform_pd.cc b/repos/base-fiasco/src/core/platform_pd.cc index 25ef4901f..783a7c5cb 100644 --- a/repos/base-fiasco/src/core/platform_pd.cc +++ b/repos/base-fiasco/src/core/platform_pd.cc @@ -19,7 +19,7 @@ */ /* Genode includes */ -#include +#include /* core includes */ #include diff --git a/repos/base-fiasco/src/include/base/internal/native_thread.h b/repos/base-fiasco/src/include/base/internal/native_thread.h index 454e65c2b..5f80a5896 100644 --- a/repos/base-fiasco/src/include/base/internal/native_thread.h +++ b/repos/base-fiasco/src/include/base/internal/native_thread.h @@ -22,7 +22,11 @@ namespace Fiasco { #include } -namespace Genode { struct Native_thread; } +namespace Genode { + + struct Platform_thread; + struct Native_thread; +} struct Genode::Native_thread { diff --git a/repos/base-foc/include/base/native_capability.h b/repos/base-foc/include/base/native_capability.h new file mode 100644 index 000000000..31f4a381d --- /dev/null +++ b/repos/base-foc/include/base/native_capability.h @@ -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 +} + +/* Genode includes */ +#include + +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_ */ diff --git a/repos/base-foc/include/base/native_types.h b/repos/base-foc/include/base/native_types.h deleted file mode 100644 index efb68c59d..000000000 --- a/repos/base-foc/include/base/native_types.h +++ /dev/null @@ -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 - -namespace Fiasco { -#include -#include -#include -#include - - 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_ */ diff --git a/repos/base-foc/include/foc/native_capability.h b/repos/base-foc/include/foc/native_capability.h new file mode 100644 index 000000000..8cf9b5152 --- /dev/null +++ b/repos/base-foc/include/foc/native_capability.h @@ -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 +#include +#include +#include + + 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_ */ diff --git a/repos/base-foc/src/core/include/cap_mapping.h b/repos/base-foc/src/core/include/cap_mapping.h index 57d3e944f..57b89097b 100644 --- a/repos/base-foc/src/core/include/cap_mapping.h +++ b/repos/base-foc/src/core/include/cap_mapping.h @@ -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); }; } diff --git a/repos/base-foc/src/core/include/ipc_pager.h b/repos/base-foc/src/core/include/ipc_pager.h index 700fe2bbc..1686a0eed 100644 --- a/repos/base-foc/src/core/include/ipc_pager.h +++ b/repos/base-foc/src/core/include/ipc_pager.h @@ -19,9 +19,10 @@ #include #include #include -#include +#include #include #include +#include /* base-internal includes */ #include diff --git a/repos/base-foc/src/core/include/platform_thread.h b/repos/base-foc/src/core/include/platform_thread.h index 9d9d2ec9f..570781074 100644 --- a/repos/base-foc/src/core/include/platform_thread.h +++ b/repos/base-foc/src/core/include/platform_thread.h @@ -16,7 +16,7 @@ #define _CORE__INCLUDE__PLATFORM_THREAD_H_ /* Genode includes */ -#include +#include #include /* core includes */ diff --git a/repos/base-foc/src/core/ipc_pager.cc b/repos/base-foc/src/core/ipc_pager.cc index ffe49a807..32797cc18 100644 --- a/repos/base-foc/src/core/ipc_pager.cc +++ b/repos/base-foc/src/core/ipc_pager.cc @@ -15,9 +15,13 @@ #include #include -/* Core includes */ +/* core includes */ #include +/* base-internal includes */ +#include + +/* Fiasco includes */ namespace Fiasco { #include } diff --git a/repos/base-foc/src/core/platform_pd.cc b/repos/base-foc/src/core/platform_pd.cc index a8bbbd452..3ee2bf20a 100644 --- a/repos/base-foc/src/core/platform_pd.cc +++ b/repos/base-foc/src/core/platform_pd.cc @@ -13,7 +13,7 @@ */ /* Genode includes */ -#include +#include #include /* core includes */ diff --git a/repos/base-foc/src/core/rpc_cap_factory.cc b/repos/base-foc/src/core/rpc_cap_factory.cc index 8de3ffbf6..84346bddc 100644 --- a/repos/base-foc/src/core/rpc_cap_factory.cc +++ b/repos/base-foc/src/core/rpc_cap_factory.cc @@ -14,7 +14,6 @@ /* Genode includes */ #include -#include #include /* core includes */ @@ -23,6 +22,10 @@ #include #include +/* base-internal includes */ +#include + +/* Fiasco includes */ namespace Fiasco { #include #include diff --git a/repos/base-foc/src/core/signal_source_component.cc b/repos/base-foc/src/core/signal_source_component.cc index a4f9656f1..309f5f25e 100644 --- a/repos/base-foc/src/core/signal_source_component.cc +++ b/repos/base-foc/src/core/signal_source_component.cc @@ -14,7 +14,7 @@ /* Genode includes */ #include -#include +#include /* core includes */ #include diff --git a/repos/base-foc/include/base/cap_alloc.h b/repos/base-foc/src/include/base/internal/cap_alloc.h similarity index 97% rename from repos/base-foc/include/base/cap_alloc.h rename to repos/base-foc/src/include/base/internal/cap_alloc.h index 4d0d712eb..ec8d9f329 100644 --- a/repos/base-foc/include/base/cap_alloc.h +++ b/repos/base-foc/src/include/base/internal/cap_alloc.h @@ -15,9 +15,10 @@ #define _INCLUDE__BASE__CAP_ALLOC_H_ #include -#include +#include #include #include +#include namespace Genode { diff --git a/repos/base-foc/src/include/base/internal/lock_helper.h b/repos/base-foc/src/include/base/internal/lock_helper.h index ca481e084..3efa6b2c2 100644 --- a/repos/base-foc/src/include/base/internal/lock_helper.h +++ b/repos/base-foc/src/include/base/internal/lock_helper.h @@ -19,8 +19,8 @@ #define _INCLUDE__BASE__INTERNAL__LOCK_HELPER_H_ /* Genode includes */ -#include #include +#include /* base-internal includes */ #include diff --git a/repos/base-foc/src/include/base/internal/native_utcb.h b/repos/base-foc/src/include/base/internal/native_utcb.h index 93fe8e37f..d9b1b6f71 100644 --- a/repos/base-foc/src/include/base/internal/native_utcb.h +++ b/repos/base-foc/src/include/base/internal/native_utcb.h @@ -20,6 +20,11 @@ namespace Fiasco { #include + + enum Utcb_regs { + UTCB_TCR_BADGE = 1, + UTCB_TCR_THREAD_OBJ = 2 + }; } namespace Genode { struct Native_utcb; } diff --git a/repos/base-foc/src/include/startup/internal/_main_parent_cap.h b/repos/base-foc/src/include/startup/internal/_main_parent_cap.h index 0cfaec8d8..85cc532a3 100644 --- a/repos/base-foc/src/include/startup/internal/_main_parent_cap.h +++ b/repos/base-foc/src/include/startup/internal/_main_parent_cap.h @@ -15,7 +15,8 @@ #define _INCLUDE__STARTUP__INTERNAL___MAIN_PARENT_CAP_H_ /* Genode includes */ -#include +#include +#include /* base-internal includes */ #include diff --git a/repos/base-foc/src/lib/base/cap_alloc.cc b/repos/base-foc/src/lib/base/cap_alloc.cc index d0b2f4a2b..90444d976 100644 --- a/repos/base-foc/src/lib/base/cap_alloc.cc +++ b/repos/base-foc/src/lib/base/cap_alloc.cc @@ -11,7 +11,7 @@ * under the terms of the GNU General Public License version 2. */ -#include +#include Genode::Cap_index_allocator* Genode::cap_idx_alloc() { diff --git a/repos/base-foc/src/lib/base/cap_map.cc b/repos/base-foc/src/lib/base/cap_map.cc index 522722a4c..d1f823269 100644 --- a/repos/base-foc/src/lib/base/cap_map.cc +++ b/repos/base-foc/src/lib/base/cap_map.cc @@ -15,7 +15,7 @@ /* Genode includes */ #include -#include +#include #include diff --git a/repos/base-foc/src/lib/base/ipc.cc b/repos/base-foc/src/lib/base/ipc.cc index b28ea5fa6..242a9c121 100644 --- a/repos/base-foc/src/lib/base/ipc.cc +++ b/repos/base-foc/src/lib/base/ipc.cc @@ -31,6 +31,7 @@ /* base-internal includes */ #include /* for 'thread_get_my_native_id()' */ #include +#include /* Fiasco.OC includes */ namespace Fiasco { diff --git a/repos/base-foc/src/lib/base/thread_bootstrap.cc b/repos/base-foc/src/lib/base/thread_bootstrap.cc index 578fc3d84..14fa7c38e 100644 --- a/repos/base-foc/src/lib/base/thread_bootstrap.cc +++ b/repos/base-foc/src/lib/base/thread_bootstrap.cc @@ -16,6 +16,10 @@ #include #include #include +#include + +/* base-internal includes */ +#include /***************************** diff --git a/repos/base-foc/src/lib/base/thread_myself.cc b/repos/base-foc/src/lib/base/thread_myself.cc index 593ebc523..d15a05859 100644 --- a/repos/base-foc/src/lib/base/thread_myself.cc +++ b/repos/base-foc/src/lib/base/thread_myself.cc @@ -11,8 +11,12 @@ * under the terms of the GNU General Public License version 2. */ +/* Genode includes */ #include +/* base-internal includes */ +#include + Genode::Thread *Genode::Thread::myself() { diff --git a/repos/base-foc/src/lib/base/thread_start.cc b/repos/base-foc/src/lib/base/thread_start.cc index bc4ef528a..271831830 100644 --- a/repos/base-foc/src/lib/base/thread_start.cc +++ b/repos/base-foc/src/lib/base/thread_start.cc @@ -19,10 +19,12 @@ #include #include #include +#include /* base-internal includes */ #include +/* Fiasco includes */ namespace Fiasco { #include } diff --git a/repos/base-hw/include/base/native_types.h b/repos/base-hw/include/base/native_types.h deleted file mode 100644 index a0ae9c7a8..000000000 --- a/repos/base-hw/include/base/native_types.h +++ /dev/null @@ -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 - -#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */ diff --git a/repos/base-hw/src/core/env.cc b/repos/base-hw/src/core/env.cc index c86773533..cfb2d1517 100644 --- a/repos/base-hw/src/core/env.cc +++ b/repos/base-hw/src/core/env.cc @@ -12,7 +12,10 @@ */ /* Genode includes */ -#include #include +/* base-internal includes */ +#include + + void Genode::upgrade_pd_session_quota(Genode::size_t quota) { assert(false); } diff --git a/repos/base-hw/src/core/include/kernel/irq.h b/repos/base-hw/src/core/include/kernel/irq.h index 06519bab8..571e9743f 100644 --- a/repos/base-hw/src/core/include/kernel/irq.h +++ b/repos/base-hw/src/core/include/kernel/irq.h @@ -16,7 +16,6 @@ #define _CORE__INCLUDE__KERNEL__IRQ_H_ /* Genode includes */ -#include #include #include diff --git a/repos/base-hw/src/core/include/object.h b/repos/base-hw/src/core/include/object.h index 251652557..69560fd2b 100644 --- a/repos/base-hw/src/core/include/object.h +++ b/repos/base-hw/src/core/include/object.h @@ -14,7 +14,7 @@ #ifndef _CORE__INCLUDE__OBJECT_H_ #define _CORE__INCLUDE__OBJECT_H_ -#include +#include #include #include #include diff --git a/repos/base-hw/src/core/include/platform_thread.h b/repos/base-hw/src/core/include/platform_thread.h index 8e891bf39..71f9a35d4 100644 --- a/repos/base-hw/src/core/include/platform_thread.h +++ b/repos/base-hw/src/core/include/platform_thread.h @@ -17,7 +17,6 @@ /* Genode includes */ #include -#include #include /* base-internal includes */ diff --git a/repos/base-hw/src/core/kernel/init.cc b/repos/base-hw/src/core/kernel/init.cc index 0b5b2eaff..07ce9465c 100644 --- a/repos/base-hw/src/core/kernel/init.cc +++ b/repos/base-hw/src/core/kernel/init.cc @@ -23,7 +23,6 @@ /* base includes */ #include -#include using namespace Kernel; diff --git a/repos/base-hw/src/core/kernel/ipc_node.cc b/repos/base-hw/src/core/kernel/ipc_node.cc index c114d0f65..869c55957 100644 --- a/repos/base-hw/src/core/kernel/ipc_node.cc +++ b/repos/base-hw/src/core/kernel/ipc_node.cc @@ -14,7 +14,6 @@ /* Genode includes */ #include -#include /* base-internal includes */ #include diff --git a/repos/base-hw/src/include/base/internal/lock_helper.h b/repos/base-hw/src/include/base/internal/lock_helper.h index 8bdd8e5cd..44e49a684 100644 --- a/repos/base-hw/src/include/base/internal/lock_helper.h +++ b/repos/base-hw/src/include/base/internal/lock_helper.h @@ -15,7 +15,6 @@ #define _INCLUDE__BASE__INTERNAL__LOCK_HELPER_H_ /* Genode includes */ -#include #include namespace Hw { diff --git a/repos/base-hw/include/base/native_env.h b/repos/base-hw/src/include/base/internal/native_env.h similarity index 76% rename from repos/base-hw/include/base/native_env.h rename to repos/base-hw/src/include/base/internal/native_env.h index 2cb9c99a1..9966948ff 100644 --- a/repos/base-hw/include/base/native_env.h +++ b/repos/base-hw/src/include/base/internal/native_env.h @@ -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 @@ -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_ */ diff --git a/repos/base-hw/src/lib/base/env.cc b/repos/base-hw/src/lib/base/env.cc index 656e1938c..4df185925 100644 --- a/repos/base-hw/src/lib/base/env.cc +++ b/repos/base-hw/src/lib/base/env.cc @@ -14,7 +14,9 @@ /* Genode includes */ #include #include -#include + +/* base-internal includes */ +#include void Genode::upgrade_pd_session_quota(Genode::size_t quota) diff --git a/repos/base-hw/src/lib/base/ipc.cc b/repos/base-hw/src/lib/base/ipc.cc index 84141532f..33c622695 100644 --- a/repos/base-hw/src/lib/base/ipc.cc +++ b/repos/base-hw/src/lib/base/ipc.cc @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -25,6 +24,7 @@ #include #include #include +#include /* base-hw includes */ #include diff --git a/repos/base-linux/include/base/native_types.h b/repos/base-linux/include/base/native_capability.h similarity index 77% rename from repos/base-linux/include/base/native_types.h rename to repos/base-linux/include/base/native_capability.h index d642981d8..512d15788 100644 --- a/repos/base-linux/include/base/native_types.h +++ b/repos/base-linux/include/base/native_capability.h @@ -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 -#include +#include #include namespace Genode { @@ -40,8 +40,6 @@ namespace Genode { }; typedef Native_capability_tpl Native_capability; - - enum { PARENT_SOCKET_HANDLE = 100 }; } -#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */ +#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */ diff --git a/repos/base-linux/src/core/native_pd_component.cc b/repos/base-linux/src/core/native_pd_component.cc index 1fee9e748..b2f3e84e5 100644 --- a/repos/base-linux/src/core/native_pd_component.cc +++ b/repos/base-linux/src/core/native_pd_component.cc @@ -20,6 +20,9 @@ #include #include +/* base-internal includes */ +#include + /* Linux includes */ #include diff --git a/repos/base-linux/src/core/platform.cc b/repos/base-linux/src/core/platform.cc index 13199bd51..41496cc11 100644 --- a/repos/base-linux/src/core/platform.cc +++ b/repos/base-linux/src/core/platform.cc @@ -17,6 +17,7 @@ /* base-internal includes */ #include +#include /* local includes */ #include "platform.h" diff --git a/repos/base-linux/src/include/base/internal/lock_helper.h b/repos/base-linux/src/include/base/internal/lock_helper.h index f2115599e..be73b9a3d 100644 --- a/repos/base-linux/src/include/base/internal/lock_helper.h +++ b/repos/base-linux/src/include/base/internal/lock_helper.h @@ -21,7 +21,6 @@ #define _INCLUDE__BASE__INTERNAL__LOCK_HELPER_H_ /* Genode includes */ -#include #include /* Linux includes */ diff --git a/repos/base-linux/src/include/base/internal/parent_socket_handle.h b/repos/base-linux/src/include/base/internal/parent_socket_handle.h new file mode 100644 index 000000000..11d0ecac4 --- /dev/null +++ b/repos/base-linux/src/include/base/internal/parent_socket_handle.h @@ -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_ */ diff --git a/repos/base-linux/src/lib/base/platform_env.cc b/repos/base-linux/src/lib/base/platform_env.cc index 90ad7fc38..ba0f3f2a5 100644 --- a/repos/base-linux/src/lib/base/platform_env.cc +++ b/repos/base-linux/src/lib/base/platform_env.cc @@ -21,6 +21,7 @@ #include #include #include +#include using namespace Genode; diff --git a/repos/base-nova/include/base/native_types.h b/repos/base-nova/include/base/native_capability.h similarity index 93% rename from repos/base-nova/include/base/native_types.h rename to repos/base-nova/include/base/native_capability.h index dade6aa97..996cfeb05 100644 --- a/repos/base-nova/include/base/native_types.h +++ b/repos/base-nova/include/base/native_capability.h @@ -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 +#include #include #include @@ -173,4 +172,4 @@ namespace Genode { }; } -#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */ +#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */ diff --git a/repos/base-nova/src/core/include/ipc_pager.h b/repos/base-nova/src/core/include/ipc_pager.h index 7f8a3c703..b7d0e6eae 100644 --- a/repos/base-nova/src/core/include/ipc_pager.h +++ b/repos/base-nova/src/core/include/ipc_pager.h @@ -18,7 +18,6 @@ #include #include #include -#include #include /* NOVA includes */ diff --git a/repos/base-nova/src/core/include/platform_thread.h b/repos/base-nova/src/core/include/platform_thread.h index 92a2c1324..92ab26946 100644 --- a/repos/base-nova/src/core/include/platform_thread.h +++ b/repos/base-nova/src/core/include/platform_thread.h @@ -18,7 +18,6 @@ /* Genode includes */ #include #include -#include #include /* base-internal includes */ diff --git a/repos/base-nova/src/include/base/internal/lock_helper.h b/repos/base-nova/src/include/base/internal/lock_helper.h index 112ea3801..945910262 100644 --- a/repos/base-nova/src/include/base/internal/lock_helper.h +++ b/repos/base-nova/src/include/base/internal/lock_helper.h @@ -19,7 +19,6 @@ #define _INCLUDE__BASE__INTERNAL__LOCK_HELPER_H_ /* Genode includes */ -#include #include #include diff --git a/repos/base-okl4/include/base/native_types.h b/repos/base-okl4/include/base/native_capability.h similarity index 67% rename from repos/base-okl4/include/base/native_types.h rename to repos/base-okl4/include/base/native_capability.h index 54cfdb09e..faa839f38 100644 --- a/repos/base-okl4/include/base/native_types.h +++ b/repos/base-okl4/include/base/native_capability.h @@ -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 +#include #include 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 Native_capability; } -#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */ +#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */ diff --git a/repos/base-okl4/src/core/include/ipc_pager.h b/repos/base-okl4/src/core/include/ipc_pager.h index c9f6dc7b4..8eac80773 100644 --- a/repos/base-okl4/src/core/include/ipc_pager.h +++ b/repos/base-okl4/src/core/include/ipc_pager.h @@ -17,7 +17,6 @@ #include #include #include -#include namespace Okl4 { extern "C" { #include diff --git a/repos/base-okl4/src/core/include/platform_thread.h b/repos/base-okl4/src/core/include/platform_thread.h index c0f1c00cd..7c31b2cab 100644 --- a/repos/base-okl4/src/core/include/platform_thread.h +++ b/repos/base-okl4/src/core/include/platform_thread.h @@ -16,7 +16,6 @@ /* Genode includes */ #include -#include /* core includes */ #include diff --git a/repos/base-okl4/src/core/include/util.h b/repos/base-okl4/src/core/include/util.h index 33afb7774..7fec16926 100644 --- a/repos/base-okl4/src/core/include/util.h +++ b/repos/base-okl4/src/core/include/util.h @@ -15,7 +15,6 @@ #define _CORE__INCLUDE__UTIL_H_ /* Genode includes */ -#include #include #include #include diff --git a/repos/base-okl4/src/core/irq_session_component.cc b/repos/base-okl4/src/core/irq_session_component.cc index 2db1e8470..67299c4df 100644 --- a/repos/base-okl4/src/core/irq_session_component.cc +++ b/repos/base-okl4/src/core/irq_session_component.cc @@ -20,6 +20,9 @@ #include #include +/* base-internal includes */ +#include + /* OKL4 includes */ namespace Okl4 { extern "C" { #include diff --git a/repos/base-okl4/src/core/pager.cc b/repos/base-okl4/src/core/pager.cc index 2603ee30e..3df81be42 100644 --- a/repos/base-okl4/src/core/pager.cc +++ b/repos/base-okl4/src/core/pager.cc @@ -21,6 +21,7 @@ /* base-internal includes */ #include +#include namespace Okl4 { extern "C" { #include diff --git a/repos/base-okl4/src/core/platform.cc b/repos/base-okl4/src/core/platform.cc index 7f7f14ab3..f12911a2c 100644 --- a/repos/base-okl4/src/core/platform.cc +++ b/repos/base-okl4/src/core/platform.cc @@ -20,6 +20,7 @@ /* base-internal includes */ #include #include +#include /* core includes */ #include diff --git a/repos/base-okl4/src/include/base/internal/lock_helper.h b/repos/base-okl4/src/include/base/internal/lock_helper.h index 3ea881748..721a394d0 100644 --- a/repos/base-okl4/src/include/base/internal/lock_helper.h +++ b/repos/base-okl4/src/include/base/internal/lock_helper.h @@ -18,7 +18,6 @@ #define _INCLUDE__BASE__INTERNAL__LOCK_HELPER_H_ /* Genode includes */ -#include #include /* OKL4 includes */ diff --git a/repos/base-okl4/src/include/base/internal/native_utcb.h b/repos/base-okl4/src/include/base/internal/native_utcb.h index 000a00d69..abdeb7cea 100644 --- a/repos/base-okl4/src/include/base/internal/native_utcb.h +++ b/repos/base-okl4/src/include/base/internal/native_utcb.h @@ -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_ */ diff --git a/repos/base-okl4/src/lib/base/ipc.cc b/repos/base-okl4/src/lib/base/ipc.cc index 6dcc5457c..a846afaa4 100644 --- a/repos/base-okl4/src/lib/base/ipc.cc +++ b/repos/base-okl4/src/lib/base/ipc.cc @@ -14,11 +14,11 @@ /* Genode includes */ #include #include -#include #include /* base-internal includes */ #include +#include /* OKL4 includes */ namespace Okl4 { extern "C" { diff --git a/repos/base-okl4/src/lib/base/thread_bootstrap.cc b/repos/base-okl4/src/lib/base/thread_bootstrap.cc index b7c7c23ff..ea74ac203 100644 --- a/repos/base-okl4/src/lib/base/thread_bootstrap.cc +++ b/repos/base-okl4/src/lib/base/thread_bootstrap.cc @@ -18,6 +18,7 @@ /* base-internal includes */ #include +#include /* OKL4 includes */ namespace Okl4 { extern "C" { diff --git a/repos/base-pistachio/include/base/native_types.h b/repos/base-pistachio/include/base/native_capability.h similarity index 75% rename from repos/base-pistachio/include/base/native_types.h rename to repos/base-pistachio/include/base/native_capability.h index 604ba02bf..8bec3c24f 100644 --- a/repos/base-pistachio/include/base/native_types.h +++ b/repos/base-pistachio/include/base/native_capability.h @@ -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 +#include #include namespace Pistachio { @@ -38,4 +38,4 @@ namespace Genode { typedef Native_capability_tpl Native_capability; } -#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */ +#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */ diff --git a/repos/base-pistachio/src/core/include/ipc_pager.h b/repos/base-pistachio/src/core/include/ipc_pager.h index 9bccf6dfb..daa9bad7a 100644 --- a/repos/base-pistachio/src/core/include/ipc_pager.h +++ b/repos/base-pistachio/src/core/include/ipc_pager.h @@ -16,7 +16,6 @@ /* Genode includes */ #include -#include #include #include #include diff --git a/repos/base-pistachio/src/core/include/platform_thread.h b/repos/base-pistachio/src/core/include/platform_thread.h index 8a533b4ef..024da1598 100644 --- a/repos/base-pistachio/src/core/include/platform_thread.h +++ b/repos/base-pistachio/src/core/include/platform_thread.h @@ -15,7 +15,7 @@ #define _CORE__INCLUDE__PLATFORM_THREAD_H_ /* Genode includes */ -#include +#include #include /* core includes */ diff --git a/repos/base-pistachio/src/core/include/util.h b/repos/base-pistachio/src/core/include/util.h index 51830b1d5..e65c46adc 100644 --- a/repos/base-pistachio/src/core/include/util.h +++ b/repos/base-pistachio/src/core/include/util.h @@ -19,7 +19,6 @@ #include #include #include -#include /* base-internal includes */ #include diff --git a/repos/base-pistachio/src/include/base/internal/lock_helper.h b/repos/base-pistachio/src/include/base/internal/lock_helper.h index 177ab98ed..4b7d09693 100644 --- a/repos/base-pistachio/src/include/base/internal/lock_helper.h +++ b/repos/base-pistachio/src/include/base/internal/lock_helper.h @@ -18,7 +18,6 @@ #define _INCLUDE__BASE__INTERNAL__LOCK_HELPER_H_ /* Genode includes */ -#include #include /* Pistachio includes */ diff --git a/repos/base-sel4/include/base/native_types.h b/repos/base-sel4/include/base/native_capability.h similarity index 88% rename from repos/base-sel4/include/base/native_types.h rename to repos/base-sel4/include/base/native_capability.h index 50a93e4e1..1e37b6790 100644 --- a/repos/base-sel4/include/base/native_types.h +++ b/repos/base-sel4/include/base/native_capability.h @@ -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 -#include namespace Genode { @@ -100,4 +99,4 @@ namespace Genode { }; } -#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */ +#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */ diff --git a/repos/base-sel4/src/core/capability_space.cc b/repos/base-sel4/src/core/capability_space.cc index 24679d6a9..ac7f97945 100644 --- a/repos/base-sel4/src/core/capability_space.cc +++ b/repos/base-sel4/src/core/capability_space.cc @@ -12,7 +12,7 @@ */ /* base includes */ -#include +#include #include /* base-internal includes */ diff --git a/repos/base-sel4/src/core/include/ipc_pager.h b/repos/base-sel4/src/core/include/ipc_pager.h index 9082f8f0c..a66759f6c 100644 --- a/repos/base-sel4/src/core/include/ipc_pager.h +++ b/repos/base-sel4/src/core/include/ipc_pager.h @@ -17,7 +17,6 @@ #include #include #include -#include namespace Genode { diff --git a/repos/base-sel4/src/core/include/platform_thread.h b/repos/base-sel4/src/core/include/platform_thread.h index 8cf5bc594..d671875f4 100644 --- a/repos/base-sel4/src/core/include/platform_thread.h +++ b/repos/base-sel4/src/core/include/platform_thread.h @@ -16,7 +16,6 @@ /* Genode includes */ #include -#include #include /* core includes */ diff --git a/repos/base-sel4/src/include/base/internal/capability_space.h b/repos/base-sel4/src/include/base/internal/capability_space.h index e75d360dd..dde982e6c 100644 --- a/repos/base-sel4/src/include/base/internal/capability_space.h +++ b/repos/base-sel4/src/include/base/internal/capability_space.h @@ -19,7 +19,6 @@ #define _INCLUDE__BASE__INTERNAL__CAPABILITY_SPACE_H_ /* Genode includes */ -#include #include /* base-internal includes */ diff --git a/repos/base-sel4/src/include/base/internal/native_types.h b/repos/base-sel4/src/include/base/internal/native_types.h deleted file mode 100644 index 0c1ad79ca..000000000 --- a/repos/base-sel4/src/include/base/internal/native_types.h +++ /dev/null @@ -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 - -#endif /* _INCLUDE__BASE__INTERNAL__NATIVE_TYPES_H_ */ diff --git a/repos/base-sel4/src/lib/base/capability.cc b/repos/base-sel4/src/lib/base/capability.cc index 6c9093f12..f6197b1dc 100644 --- a/repos/base-sel4/src/lib/base/capability.cc +++ b/repos/base-sel4/src/lib/base/capability.cc @@ -15,7 +15,6 @@ #include /* base-internal includes */ -#include #include using namespace Genode; diff --git a/repos/base-sel4/src/lib/base/capability_space.cc b/repos/base-sel4/src/lib/base/capability_space.cc index d3c3b128c..c2d3fe7a3 100644 --- a/repos/base-sel4/src/lib/base/capability_space.cc +++ b/repos/base-sel4/src/lib/base/capability_space.cc @@ -12,7 +12,7 @@ */ /* base includes */ -#include +#include #include #include diff --git a/repos/base/include/base/capability.h b/repos/base/include/base/capability.h index c22cfe0a8..3afb315c2 100644 --- a/repos/base/include/base/capability.h +++ b/repos/base/include/base/capability.h @@ -18,7 +18,7 @@ #include #include -#include +#include namespace Genode { diff --git a/repos/base/include/base/ipc_msgbuf.h b/repos/base/include/base/ipc_msgbuf.h index a8493a4b5..490515075 100644 --- a/repos/base/include/base/ipc_msgbuf.h +++ b/repos/base/include/base/ipc_msgbuf.h @@ -15,7 +15,6 @@ #define _INCLUDE__BASE__IPC_MSGBUF_H_ #include -#include #include #include #include diff --git a/repos/base/include/base/native_capability.h b/repos/base/include/base/native_capability_tpl.h similarity index 95% rename from repos/base/include/base/native_capability.h rename to repos/base/include/base/native_capability_tpl.h index 4b22c7e6f..145fb876e 100644 --- a/repos/base/include/base/native_capability.h +++ b/repos/base/include/base/native_capability_tpl.h @@ -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 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_ */ diff --git a/repos/base/src/include/base/internal/stack.h b/repos/base/src/include/base/internal/stack.h index fb4734694..3efbcf08c 100644 --- a/repos/base/src/include/base/internal/stack.h +++ b/repos/base/src/include/base/internal/stack.h @@ -55,7 +55,6 @@ /* Genode includes */ #include -#include /* for 'Native_utcb' */ #include #include /* for 'Ram_dataspace_capability' type */ #include /* for 'Cpu_session::Name' type */ diff --git a/repos/base/src/lib/startup/cap_copy.cc b/repos/base/src/lib/startup/cap_copy.cc index fa33ac1ad..fcb8ac2ec 100644 --- a/repos/base/src/lib/startup/cap_copy.cc +++ b/repos/base/src/lib/startup/cap_copy.cc @@ -12,7 +12,7 @@ */ #include -#include +#include using namespace Genode; diff --git a/repos/ports-foc/src/lib/l4lx/include/task.h b/repos/ports-foc/src/lib/l4lx/include/task.h index a86d81382..738658767 100644 --- a/repos/ports-foc/src/lib/l4lx/include/task.h +++ b/repos/ports-foc/src/lib/l4lx/include/task.h @@ -22,6 +22,7 @@ namespace Fiasco { #include #include +#include } namespace L4lx { diff --git a/repos/ports-foc/src/lib/l4lx/l4lx_thread.cc b/repos/ports-foc/src/lib/l4lx/l4lx_thread.cc index 4682635da..62c098fa5 100644 --- a/repos/ports-foc/src/lib/l4lx/l4lx_thread.cc +++ b/repos/ports-foc/src/lib/l4lx/l4lx_thread.cc @@ -14,6 +14,7 @@ /* Genode includes */ #include #include +#include #include #include diff --git a/repos/ports-foc/src/lib/l4lx/startup.cc b/repos/ports-foc/src/lib/l4lx/startup.cc index d15bff694..e415c217c 100644 --- a/repos/ports-foc/src/lib/l4lx/startup.cc +++ b/repos/ports-foc/src/lib/l4lx/startup.cc @@ -14,13 +14,13 @@ /* Genode includes */ #include #include -#include #include #include #include #include #include #include +#include /* L4lx includes */ #include diff --git a/repos/ports/src/app/seoul/main.cc b/repos/ports/src/app/seoul/main.cc index 24898375c..10c85d689 100644 --- a/repos/ports/src/app/seoul/main.cc +++ b/repos/ports/src/app/seoul/main.cc @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include