diff --git a/repos/base-fiasco/lib/mk/base-common.mk b/repos/base-fiasco/lib/mk/base-common.mk
index 8cf7bbb60c..e035876823 100644
--- a/repos/base-fiasco/lib/mk/base-common.mk
+++ b/repos/base-fiasco/lib/mk/base-common.mk
@@ -24,8 +24,7 @@ SRC_CC += thread/myself.cc
SRC_CC += thread/context_allocator.cc
SRC_CC += sleep.cc
-INC_DIR += $(REP_DIR)/src/base/lock
-INC_DIR += $(BASE_DIR)/src/base/thread
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
vpath cap_copy.cc $(BASE_DIR)/src/lib/startup
vpath %.cc $(REP_DIR)/src/base
diff --git a/repos/base-fiasco/lib/mk/base.mk b/repos/base-fiasco/lib/mk/base.mk
index 5e7bdf98c1..6510601ba0 100644
--- a/repos/base-fiasco/lib/mk/base.mk
+++ b/repos/base-fiasco/lib/mk/base.mk
@@ -13,7 +13,7 @@ SRC_CC += thread/thread_start.cc
SRC_CC += irq/platform.cc
SRC_CC += server/rpc_cap_alloc.cc
-INC_DIR += $(BASE_DIR)/src/base/env
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base
diff --git a/repos/base-fiasco/src/core/target.inc b/repos/base-fiasco/src/core/target.inc
index 210abfa6e2..df5d270cb2 100644
--- a/repos/base-fiasco/src/core/target.inc
+++ b/repos/base-fiasco/src/core/target.inc
@@ -37,8 +37,8 @@ SRC_CC += context_area.cc \
INC_DIR += $(REP_DIR)/src/core/include \
$(GEN_CORE_DIR)/include \
- $(REP_DIR)/src/base/console \
- $(BASE_DIR)/src/base/thread
+ $(REP_DIR)/src/include \
+ $(BASE_DIR)/src/include
LIBS += base-common
diff --git a/repos/base-fiasco/src/base/console/core_console.h b/repos/base-fiasco/src/include/base/internal/core_console.h
similarity index 100%
rename from repos/base-fiasco/src/base/console/core_console.h
rename to repos/base-fiasco/src/include/base/internal/core_console.h
diff --git a/repos/base-fiasco/src/base/lock/lock_helper.h b/repos/base-fiasco/src/include/base/internal/lock_helper.h
similarity index 100%
rename from repos/base-fiasco/src/base/lock/lock_helper.h
rename to repos/base-fiasco/src/include/base/internal/lock_helper.h
diff --git a/repos/base-foc/lib/mk/base-common.mk b/repos/base-foc/lib/mk/base-common.mk
index ed32cd7c13..083daa0151 100644
--- a/repos/base-foc/lib/mk/base-common.mk
+++ b/repos/base-foc/lib/mk/base-common.mk
@@ -24,9 +24,7 @@ SRC_CC += thread/myself.cc
SRC_CC += thread/context_allocator.cc
SRC_CC += sleep.cc
-INC_DIR += $(REP_DIR)/src/base/lock
-INC_DIR += $(BASE_DIR)/src/base/lock
-INC_DIR += $(BASE_DIR)/src/base/thread
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base
diff --git a/repos/base-foc/lib/mk/base.mk b/repos/base-foc/lib/mk/base.mk
index 459a00389b..bb3e929e2a 100644
--- a/repos/base-foc/lib/mk/base.mk
+++ b/repos/base-foc/lib/mk/base.mk
@@ -14,7 +14,7 @@ SRC_CC += thread/thread_start.cc
SRC_CC += irq/platform.cc
SRC_CC += server/rpc_cap_alloc.cc
-INC_DIR += $(BASE_DIR)/src/base/env
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base
diff --git a/repos/base-foc/src/base/env/cap_map.cc b/repos/base-foc/src/base/env/cap_map.cc
index 64ccde64cf..522722a4c4 100644
--- a/repos/base-foc/src/base/env/cap_map.cc
+++ b/repos/base-foc/src/base/env/cap_map.cc
@@ -13,14 +13,16 @@
* under the terms of the GNU General Public License version 2.
*/
+/* Genode includes */
#include
#include
#include
-/* Lock implementation local include */
-#include
+/* base-internal includes */
+#include
+/* kernel includes */
namespace Fiasco {
#include
#include
diff --git a/repos/base-foc/src/base/env/spin_lock.cc b/repos/base-foc/src/base/env/spin_lock.cc
index 2f686f5ced..eacb70f410 100644
--- a/repos/base-foc/src/base/env/spin_lock.cc
+++ b/repos/base-foc/src/base/env/spin_lock.cc
@@ -16,8 +16,8 @@
/* Genode includes */
#include
-/* Lock implementation local include */
-#include
+/* base-internal includes */
+#include
Genode::Spin_lock::Spin_lock() : _spinlock(SPINLOCK_UNLOCKED) {}
diff --git a/repos/base-foc/src/base/ipc/ipc.cc b/repos/base-foc/src/base/ipc/ipc.cc
index 5c8ca86d0b..2aec854407 100644
--- a/repos/base-foc/src/base/ipc/ipc.cc
+++ b/repos/base-foc/src/base/ipc/ipc.cc
@@ -27,8 +27,8 @@
#include
#include
-/* base-foc/src/base/lock */
-#include /* for 'thread_get_my_native_id()' */
+/* base-internal includes */
+#include /* for 'thread_get_my_native_id()' */
/* Fiasco.OC includes */
namespace Fiasco {
diff --git a/repos/base-foc/src/core/target.inc b/repos/base-foc/src/core/target.inc
index 1f4295f496..cb894d7380 100644
--- a/repos/base-foc/src/core/target.inc
+++ b/repos/base-foc/src/core/target.inc
@@ -40,10 +40,8 @@ SRC_CC += context_area.cc \
INC_DIR += $(REP_DIR)/src/core/include \
$(GEN_CORE_DIR)/include \
- $(REP_DIR)/src/base/lock \
- $(BASE_DIR)/src/base/lock \
- $(BASE_DIR)/src/base/thread \
- $(REP_DIR)/src/base/console
+ $(REP_DIR)/src/include \
+ $(BASE_DIR)/src/include
include $(GEN_CORE_DIR)/version.inc
diff --git a/repos/base-foc/src/base/console/core_console.h b/repos/base-foc/src/include/base/internal/core_console.h
similarity index 100%
rename from repos/base-foc/src/base/console/core_console.h
rename to repos/base-foc/src/include/base/internal/core_console.h
diff --git a/repos/base-foc/src/base/lock/lock_helper.h b/repos/base-foc/src/include/base/internal/lock_helper.h
similarity index 100%
rename from repos/base-foc/src/base/lock/lock_helper.h
rename to repos/base-foc/src/include/base/internal/lock_helper.h
diff --git a/repos/base-foc/src/lib/startup/_main_parent_cap.h b/repos/base-foc/src/include/startup/internal/_main_parent_cap.h
similarity index 84%
rename from repos/base-foc/src/lib/startup/_main_parent_cap.h
rename to repos/base-foc/src/include/startup/internal/_main_parent_cap.h
index 1350661115..7378518d6e 100644
--- a/repos/base-foc/src/lib/startup/_main_parent_cap.h
+++ b/repos/base-foc/src/include/startup/internal/_main_parent_cap.h
@@ -11,8 +11,8 @@
* under the terms of the GNU General Public License version 2.
*/
-#ifndef _LIB__STARTUP___MAIN_PARENT_CAP_H_
-#define _LIB__STARTUP___MAIN_PARENT_CAP_H_
+#ifndef _INCLUDE__STARTUP__INTERNAL___MAIN_PARENT_CAP_H_
+#define _INCLUDE__STARTUP__INTERNAL___MAIN_PARENT_CAP_H_
#include
@@ -41,4 +41,4 @@ namespace Genode {
}
}
-#endif /* _LIB__STARTUP___MAIN_PARENT_CAP_H_ */
+#endif /* _INCLUDE__STARTUP__INTERNAL___MAIN_PARENT_CAP_H_ */
diff --git a/repos/base-hw/lib/mk/base-common.inc b/repos/base-hw/lib/mk/base-common.inc
index 675aa63eea..2e4320f6af 100644
--- a/repos/base-hw/lib/mk/base-common.inc
+++ b/repos/base-hw/lib/mk/base-common.inc
@@ -1,14 +1,12 @@
#
-# \brief Portions of base library shared by core and non-core processes
+# \brief Portions of base library shared by core and non-core components
# \author Norman Feske
# \author Martin Stein
# \date 2013-02-14
#
-# add library dependencies
LIBS += cxx
-# add C++ sources
SRC_CC += ipc/ipc.cc
SRC_CC += avl_tree/avl_tree.cc
SRC_CC += allocator/slab.cc
@@ -31,11 +29,7 @@ SRC_CC += thread/context_allocator.cc
SRC_CC += kernel/interface.cc
SRC_CC += sleep.cc
-# add include paths
-INC_DIR += $(REP_DIR)/src/base/lock
-INC_DIR += $(BASE_DIR)/src/base/lock
-INC_DIR += $(BASE_DIR)/src/base/thread
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
-# declare source locations
vpath % $(REP_DIR)/src/base
vpath % $(BASE_DIR)/src/base
diff --git a/repos/base-hw/lib/mk/base.mk b/repos/base-hw/lib/mk/base.mk
index 562d217dda..278588f474 100644
--- a/repos/base-hw/lib/mk/base.mk
+++ b/repos/base-hw/lib/mk/base.mk
@@ -1,13 +1,11 @@
#
-# \brief Portions of base library that are exclusive to non-core processes
+# \brief Portions of base library that are exclusive to non-core components
# \author Norman Feske
# \date 2013-02-14
#
-# add library dependencies
LIBS += base-common startup
-# add C++ sources
SRC_CC += console/log_console.cc
SRC_CC += cpu/cache.cc
SRC_CC += env/env.cc
@@ -19,11 +17,7 @@ SRC_CC += env.cc
SRC_CC += capability.cc
SRC_CC += server/rpc_cap_alloc.cc
-# add include paths
-INC_DIR += $(REP_DIR)/src/base/lock
-INC_DIR += $(BASE_DIR)/src/base/lock
-INC_DIR += $(BASE_DIR)/src/base/env
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
-# declare source locations
vpath % $(REP_DIR)/src/base
vpath % $(BASE_DIR)/src/base
diff --git a/repos/base-hw/lib/mk/core.inc b/repos/base-hw/lib/mk/core.inc
index 1b5989b916..ea7773ba6f 100644
--- a/repos/base-hw/lib/mk/core.inc
+++ b/repos/base-hw/lib/mk/core.inc
@@ -11,11 +11,8 @@ LIBS += core-perf_counter
LIBS += base-common
# add include paths
-INC_DIR += $(REP_DIR)/src/core/include
-INC_DIR += $(BASE_DIR)/src/core/include
-INC_DIR += $(BASE_DIR)/src/base/include
-INC_DIR += $(BASE_DIR)/src/base/thread
-INC_DIR += $(BASE_DIR)/src/lib/startup
+INC_DIR += $(REP_DIR)/src/core/include $(BASE_DIR)/src/core/include
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
# add C++ sources
SRC_CC += console.cc
diff --git a/repos/base-hw/src/base/capability.cc b/repos/base-hw/src/base/capability.cc
index 497133d9da..02d664a976 100644
--- a/repos/base-hw/src/base/capability.cc
+++ b/repos/base-hw/src/base/capability.cc
@@ -12,9 +12,11 @@
*/
/* Genode includes */
-#include
#include
+/* base-internal includes */
+#include
+
static volatile int spinlock = SPINLOCK_UNLOCKED;
static Genode::uint8_t ref_counter[1 << (sizeof(Kernel::capid_t)*8)];
diff --git a/repos/base-hw/src/core/console.cc b/repos/base-hw/src/core/console.cc
index 24339a6202..9f0fb52c09 100644
--- a/repos/base-hw/src/core/console.cc
+++ b/repos/base-hw/src/core/console.cc
@@ -18,8 +18,8 @@
/* core includes */
#include
-/* base includes */
-#include
+/* base-internal includes */
+#include
namespace Genode
{
diff --git a/repos/base-hw/src/core/include/kernel/irq.h b/repos/base-hw/src/core/include/kernel/irq.h
index 60ac5c79cb..71e521880b 100644
--- a/repos/base-hw/src/core/include/kernel/irq.h
+++ b/repos/base-hw/src/core/include/kernel/irq.h
@@ -18,9 +18,11 @@
/* Genode includes */
#include
#include
-#include
#include
+/* base-internal includes */
+#include
+
/* core includes */
#include
diff --git a/repos/base-hw/src/core/include/pager.h b/repos/base-hw/src/core/include/pager.h
index c48fc7fc1a..4acbf38bb6 100644
--- a/repos/base-hw/src/core/include/pager.h
+++ b/repos/base-hw/src/core/include/pager.h
@@ -19,7 +19,9 @@
#include
#include
#include
-#include
+
+/* base-internal includes */
+#include
/* core-local includes */
#include
diff --git a/repos/base-hw/src/core/include/spec/x86/cpu_support.h b/repos/base-hw/src/core/include/spec/x86/cpu_support.h
index 3b92061704..cc9d0ac74c 100644
--- a/repos/base-hw/src/core/include/spec/x86/cpu_support.h
+++ b/repos/base-hw/src/core/include/spec/x86/cpu_support.h
@@ -22,7 +22,7 @@
#include
/* base includes */
-#include
+#include
/* core includes */
#include
diff --git a/repos/base-hw/src/core/kernel/cpu.cc b/repos/base-hw/src/core/kernel/cpu.cc
index 3c74ba727a..4d470bb583 100644
--- a/repos/base-hw/src/core/kernel/cpu.cc
+++ b/repos/base-hw/src/core/kernel/cpu.cc
@@ -22,8 +22,8 @@
#include
#include
-/* base includes */
-#include
+/* base-internal includes */
+#include
using namespace Kernel;
diff --git a/repos/base-hw/src/core/kernel/init.cc b/repos/base-hw/src/core/kernel/init.cc
index 5c0cd89e0b..0b5b2eaff7 100644
--- a/repos/base-hw/src/core/kernel/init.cc
+++ b/repos/base-hw/src/core/kernel/init.cc
@@ -22,7 +22,7 @@
#include
/* base includes */
-#include
+#include
#include
using namespace Kernel;
diff --git a/repos/base-hw/src/core/kernel/pd.cc b/repos/base-hw/src/core/kernel/pd.cc
index c9295a4c31..ae09dcfb16 100644
--- a/repos/base-hw/src/core/kernel/pd.cc
+++ b/repos/base-hw/src/core/kernel/pd.cc
@@ -19,7 +19,9 @@
/* Genode includes */
#include
#include
-#include
+
+/* base-internal includes */
+#include
using namespace Kernel;
diff --git a/repos/base-hw/src/core/kernel/thread.cc b/repos/base-hw/src/core/kernel/thread.cc
index 4f40635177..abc7b06141 100644
--- a/repos/base-hw/src/core/kernel/thread.cc
+++ b/repos/base-hw/src/core/kernel/thread.cc
@@ -14,10 +14,12 @@
/* Genode includes */
#include
-#include
#include
#include
+/* base-internal includes */
+#include
+
/* core includes */
#include
#include
diff --git a/repos/base-hw/src/core/platform.cc b/repos/base-hw/src/core/platform.cc
index 28bc91bcdc..48a75bb7a5 100644
--- a/repos/base-hw/src/core/platform.cc
+++ b/repos/base-hw/src/core/platform.cc
@@ -136,7 +136,7 @@ Platform::Platform()
init_alloc(_core_mem_alloc.virt_alloc(), virt_region,
_core_only_ram_regions, get_page_size_log2());
- /* preserve context area in core's virtual address space */
+ /* preserve stack area in core's virtual address space */
_core_mem_alloc.virt_alloc()->remove_range(
Native_config::context_area_virtual_base(),
Native_config::context_area_virtual_size());
diff --git a/repos/base-hw/src/core/spec/arm/smp/kernel/cpu.cc b/repos/base-hw/src/core/spec/arm/smp/kernel/cpu.cc
index 2f5ce7336c..702e6f8fe6 100644
--- a/repos/base-hw/src/core/spec/arm/smp/kernel/cpu.cc
+++ b/repos/base-hw/src/core/spec/arm/smp/kernel/cpu.cc
@@ -16,8 +16,8 @@
#include
#include
-/* base includes */
-#include
+/* base-internal includes */
+#include
/* spin-lock used to synchronize kernel access of different cpus */
diff --git a/repos/base-hw/src/core/spec/panda/platform_support.cc b/repos/base-hw/src/core/spec/panda/platform_support.cc
index 2dd72d26bf..82aa51d2dc 100644
--- a/repos/base-hw/src/core/spec/panda/platform_support.cc
+++ b/repos/base-hw/src/core/spec/panda/platform_support.cc
@@ -17,7 +17,9 @@
#include
#include
#include
-#include
+
+/* base-internal includes */
+#include
using namespace Genode;
diff --git a/repos/base-hw/src/core/spec/zynq/platform_support.cc b/repos/base-hw/src/core/spec/zynq/platform_support.cc
index e84d9db34d..daadb30e84 100644
--- a/repos/base-hw/src/core/spec/zynq/platform_support.cc
+++ b/repos/base-hw/src/core/spec/zynq/platform_support.cc
@@ -17,7 +17,9 @@
#include
#include
#include
-#include
+
+/* base-internal includes */
+#include
using namespace Genode;
diff --git a/repos/base-hw/src/base/lock/lock_helper.h b/repos/base-hw/src/include/base/internal/lock_helper.h
similarity index 100%
rename from repos/base-hw/src/base/lock/lock_helper.h
rename to repos/base-hw/src/include/base/internal/lock_helper.h
diff --git a/repos/base-hw/src/lib/startup/_main_parent_cap.h b/repos/base-hw/src/include/startup/internal/_main_parent_cap.h
similarity index 100%
rename from repos/base-hw/src/lib/startup/_main_parent_cap.h
rename to repos/base-hw/src/include/startup/internal/_main_parent_cap.h
diff --git a/repos/base-linux/lib/mk/base-common.mk b/repos/base-linux/lib/mk/base-common.mk
index 2b112b3ea4..0d5b2ae762 100644
--- a/repos/base-linux/lib/mk/base-common.mk
+++ b/repos/base-linux/lib/mk/base-common.mk
@@ -23,11 +23,7 @@ SRC_CC += thread/trace.cc thread/thread_env.cc thread/context_allocator.cc
SRC_CC += irq/platform.cc
SRC_CC += sleep.cc
-INC_DIR += $(REP_DIR)/src/base/lock $(BASE_DIR)/src/base/lock
-INC_DIR += $(REP_DIR)/src/base/ipc
-INC_DIR += $(REP_DIR)/src/base/env $(BASE_DIR)/src/base/env
-INC_DIR += $(BASE_DIR)/src/lib/startup
-INC_DIR += $(BASE_DIR)/src/base/thread
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base
diff --git a/repos/base-linux/lib/mk/base.inc b/repos/base-linux/lib/mk/base.inc
index dcc8d55a0e..4aec5c5607 100644
--- a/repos/base-linux/lib/mk/base.inc
+++ b/repos/base-linux/lib/mk/base.inc
@@ -13,7 +13,7 @@ SRC_CC += console/log_console.cc
SRC_CC += env/env.cc env/platform_env.cc env/context_area.cc
SRC_CC += server/rpc_cap_alloc.cc
-INC_DIR += $(REP_DIR)/src/base/env $(BASE_DIR)/src/base/env
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base
diff --git a/repos/base-linux/lib/mk/base.mk b/repos/base-linux/lib/mk/base.mk
index d0094b62f3..a5bce959c9 100644
--- a/repos/base-linux/lib/mk/base.mk
+++ b/repos/base-linux/lib/mk/base.mk
@@ -5,6 +5,7 @@
#
LIBS += startup cxx
+
SRC_CC += thread/thread.cc thread/myself.cc thread/thread_linux.cc
SRC_CC += server/rpc_cap_alloc.cc
diff --git a/repos/base-linux/src/base/env/platform_env.cc b/repos/base-linux/src/base/env/platform_env.cc
index ac0df83463..347897c1af 100644
--- a/repos/base-linux/src/base/env/platform_env.cc
+++ b/repos/base-linux/src/base/env/platform_env.cc
@@ -17,8 +17,8 @@
#include
#include
-/* local includes */
-#include
+/* base-internal includes */
+#include
using namespace Genode;
diff --git a/repos/base-linux/src/base/env/rm_session_mmap.cc b/repos/base-linux/src/base/env/rm_session_mmap.cc
index 0547dc29fc..8b5b32427e 100644
--- a/repos/base-linux/src/base/env/rm_session_mmap.cc
+++ b/repos/base-linux/src/base/env/rm_session_mmap.cc
@@ -37,10 +37,10 @@
#include
#include
#include
-#include
-/* local includes */
-#include
+/* base-internal includes */
+#include
+#include
using namespace Genode;
diff --git a/repos/base-linux/src/base/ipc/ipc.cc b/repos/base-linux/src/base/ipc/ipc.cc
index 7aba89e1bf..55a331660f 100644
--- a/repos/base-linux/src/base/ipc/ipc.cc
+++ b/repos/base-linux/src/base/ipc/ipc.cc
@@ -34,8 +34,8 @@
#include
#include
-/* local includes */
-#include
+/* base-internal includes */
+#include
/* Linux includes */
#include
diff --git a/repos/base-linux/src/core/context_area.cc b/repos/base-linux/src/core/context_area.cc
index 71f2553f45..6137b415a2 100644
--- a/repos/base-linux/src/core/context_area.cc
+++ b/repos/base-linux/src/core/context_area.cc
@@ -17,7 +17,8 @@
#include
#include
-#include
+/* base-internal includes */
+#include
/**
diff --git a/repos/base-linux/src/core/include/core_env.h b/repos/base-linux/src/core/include/core_env.h
index e95aed2e8d..00574231ba 100644
--- a/repos/base-linux/src/core/include/core_env.h
+++ b/repos/base-linux/src/core/include/core_env.h
@@ -25,8 +25,8 @@
#include
#include
-/* internal base includes */
-#include
+/* base-internal includes */
+#include
namespace Genode {
diff --git a/repos/base-linux/src/core/include/server_socket_pair.h b/repos/base-linux/src/core/include/server_socket_pair.h
index 62fcaf9360..68d18275fe 100644
--- a/repos/base-linux/src/core/include/server_socket_pair.h
+++ b/repos/base-linux/src/core/include/server_socket_pair.h
@@ -19,8 +19,8 @@
#include
#include
-/* include from 'src/base/ipc' */
-#include
+/* base-internal includes */
+#include
/* core-local includes */
#include
diff --git a/repos/base-linux/src/core/target.mk b/repos/base-linux/src/core/target.mk
index a3851c3030..e77cd1389e 100644
--- a/repos/base-linux/src/core/target.mk
+++ b/repos/base-linux/src/core/target.mk
@@ -31,11 +31,8 @@ SRC_CC = main.cc \
INC_DIR += $(REP_DIR)/src/core/include \
$(GEN_CORE_DIR)/include \
$(REP_DIR)/src/platform \
- $(REP_DIR)/src/base/ipc \
- $(REP_DIR)/src/base/env \
- $(BASE_DIR)/src/base/env \
- $(REP_DIR)/src/base/console \
- $(BASE_DIR)/src/base/thread \
+ $(REP_DIR)/src/include \
+ $(BASE_DIR)/src/include
HOST_INC_DIR += /usr/include
diff --git a/repos/base-linux/src/base/env/context_area.h b/repos/base-linux/src/include/base/internal/context_area.h
similarity index 100%
rename from repos/base-linux/src/base/env/context_area.h
rename to repos/base-linux/src/include/base/internal/context_area.h
diff --git a/repos/base-linux/src/base/console/core_console.h b/repos/base-linux/src/include/base/internal/core_console.h
similarity index 100%
rename from repos/base-linux/src/base/console/core_console.h
rename to repos/base-linux/src/include/base/internal/core_console.h
diff --git a/repos/base-linux/src/base/lock/lock_helper.h b/repos/base-linux/src/include/base/internal/lock_helper.h
similarity index 100%
rename from repos/base-linux/src/base/lock/lock_helper.h
rename to repos/base-linux/src/include/base/internal/lock_helper.h
diff --git a/repos/base-linux/src/base/env/platform_env.h b/repos/base-linux/src/include/base/internal/platform_env.h
similarity index 99%
rename from repos/base-linux/src/base/env/platform_env.h
rename to repos/base-linux/src/include/base/internal/platform_env.h
index 85ec614c46..3678e0da22 100644
--- a/repos/base-linux/src/base/env/platform_env.h
+++ b/repos/base-linux/src/include/base/internal/platform_env.h
@@ -27,8 +27,8 @@
#include
#include
-/* local includes (from 'base/src/base/env/') */
-#include
+/* base-internal includes */
+#include
namespace Genode {
diff --git a/repos/base-linux/src/base/ipc/socket_descriptor_registry.h b/repos/base-linux/src/include/base/internal/socket_descriptor_registry.h
similarity index 100%
rename from repos/base-linux/src/base/ipc/socket_descriptor_registry.h
rename to repos/base-linux/src/include/base/internal/socket_descriptor_registry.h
diff --git a/repos/base-nova/lib/mk/base-common.mk b/repos/base-nova/lib/mk/base-common.mk
index 9069316725..88b6fbd261 100644
--- a/repos/base-nova/lib/mk/base-common.mk
+++ b/repos/base-nova/lib/mk/base-common.mk
@@ -23,9 +23,7 @@ SRC_CC += thread/myself.cc
SRC_CC += thread/context_allocator.cc env/cap_map.cc
SRC_CC += sleep.cc
-INC_DIR += $(REP_DIR)/src/base/lock
-INC_DIR += $(BASE_DIR)/src/base/lock
-INC_DIR += $(BASE_DIR)/src/base/thread
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base
diff --git a/repos/base-nova/lib/mk/base.mk b/repos/base-nova/lib/mk/base.mk
index 1b4231ce47..502d4204cb 100644
--- a/repos/base-nova/lib/mk/base.mk
+++ b/repos/base-nova/lib/mk/base.mk
@@ -13,7 +13,7 @@ SRC_CC += thread/thread_nova.cc
SRC_CC += irq/platform.cc
SRC_CC += server/rpc_cap_alloc.cc
-INC_DIR += $(BASE_DIR)/src/base/env
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base
diff --git a/repos/base-nova/src/core/target.inc b/repos/base-nova/src/core/target.inc
index 61ff7c5ef7..d62f9974f7 100644
--- a/repos/base-nova/src/core/target.inc
+++ b/repos/base-nova/src/core/target.inc
@@ -40,9 +40,8 @@ SRC_CC = context_area.cc \
trace_session_component.cc
INC_DIR = $(REP_DIR)/src/core/include \
- $(REP_DIR)/src/base/console \
- $(BASE_DIR)/src/base/thread \
- $(BASE_DIR)/src/base/include \
+ $(REP_DIR)/src/include \
+ $(BASE_DIR)/src/include \
$(GEN_CORE_DIR)/include
include $(GEN_CORE_DIR)/version.inc
diff --git a/repos/base-nova/src/base/console/core_console.h b/repos/base-nova/src/include/base/internal/core_console.h
similarity index 100%
rename from repos/base-nova/src/base/console/core_console.h
rename to repos/base-nova/src/include/base/internal/core_console.h
diff --git a/repos/base-nova/src/base/lock/lock_helper.h b/repos/base-nova/src/include/base/internal/lock_helper.h
similarity index 100%
rename from repos/base-nova/src/base/lock/lock_helper.h
rename to repos/base-nova/src/include/base/internal/lock_helper.h
diff --git a/repos/base-nova/src/base/lock/spin_lock.h b/repos/base-nova/src/include/base/internal/spin_lock.h
similarity index 97%
rename from repos/base-nova/src/base/lock/spin_lock.h
rename to repos/base-nova/src/include/base/internal/spin_lock.h
index 8ebf1244f3..a991dbd8cd 100644
--- a/repos/base-nova/src/base/lock/spin_lock.h
+++ b/repos/base-nova/src/include/base/internal/spin_lock.h
@@ -19,8 +19,8 @@
#include
#include
-/* local includes */
-#include
+/* base-internal includes */
+#include
enum State {
diff --git a/repos/base-nova/src/lib/startup/_main_parent_cap.h b/repos/base-nova/src/include/startup/internal/_main_parent_cap.h
similarity index 100%
rename from repos/base-nova/src/lib/startup/_main_parent_cap.h
rename to repos/base-nova/src/include/startup/internal/_main_parent_cap.h
diff --git a/repos/base-okl4/lib/mk/base-common.mk b/repos/base-okl4/lib/mk/base-common.mk
index c736157a10..e035876823 100644
--- a/repos/base-okl4/lib/mk/base-common.mk
+++ b/repos/base-okl4/lib/mk/base-common.mk
@@ -24,9 +24,7 @@ SRC_CC += thread/myself.cc
SRC_CC += thread/context_allocator.cc
SRC_CC += sleep.cc
-INC_DIR += $(REP_DIR)/src/base/lock
-INC_DIR += $(BASE_DIR)/src/base/lock
-INC_DIR += $(BASE_DIR)/src/base/thread
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
vpath cap_copy.cc $(BASE_DIR)/src/lib/startup
vpath %.cc $(REP_DIR)/src/base
diff --git a/repos/base-okl4/lib/mk/base.mk b/repos/base-okl4/lib/mk/base.mk
index 90b0c746ba..e7e1f392f7 100644
--- a/repos/base-okl4/lib/mk/base.mk
+++ b/repos/base-okl4/lib/mk/base.mk
@@ -8,6 +8,6 @@ SRC_CC += server/rpc_cap_alloc.cc
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base
-INC_DIR += $(BASE_DIR)/src/base/env
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
LIBS += base-common
diff --git a/repos/base-okl4/lib/mk/boot_info.mk b/repos/base-okl4/lib/mk/boot_info.mk
index 13cebd1417..cb8f15929b 100644
--- a/repos/base-okl4/lib/mk/boot_info.mk
+++ b/repos/base-okl4/lib/mk/boot_info.mk
@@ -1,5 +1,5 @@
SRC_C = bootinfo.c
-INC_DIR += $(REP_DIR)/src/base/bootinfo
+INC_DIR += $(REP_DIR)/src/include/bootinfo/internal
CC_WARN = -Wall -Wno-attributes
vpath bootinfo.c $(OKL4_DIR)/libs/bootinfo/src
diff --git a/repos/base-okl4/src/core/target.inc b/repos/base-okl4/src/core/target.inc
index 02f471dac5..db1dcb1daf 100644
--- a/repos/base-okl4/src/core/target.inc
+++ b/repos/base-okl4/src/core/target.inc
@@ -37,11 +37,8 @@ SRC_CC += context_area.cc \
thread_start.cc \
trace_session_component.cc
-INC_DIR += $(REP_DIR)/src/core/include \
- $(GEN_CORE_DIR)/include \
- $(REP_DIR)/src/base/console \
- $(BASE_DIR)/src/base/thread \
- $(BASE_DIR)/src/lib/startup
+INC_DIR += $(REP_DIR)/src/core/include $(GEN_CORE_DIR)/include \
+ $(REP_DIR)/src/include $(BASE_DIR)/src/include
include $(GEN_CORE_DIR)/version.inc
diff --git a/repos/base-okl4/src/base/console/core_console.h b/repos/base-okl4/src/include/base/internal/core_console.h
similarity index 100%
rename from repos/base-okl4/src/base/console/core_console.h
rename to repos/base-okl4/src/include/base/internal/core_console.h
diff --git a/repos/base-okl4/src/base/lock/lock_helper.h b/repos/base-okl4/src/include/base/internal/lock_helper.h
similarity index 100%
rename from repos/base-okl4/src/base/lock/lock_helper.h
rename to repos/base-okl4/src/include/base/internal/lock_helper.h
diff --git a/repos/base-okl4/src/base/bootinfo/stdint.h b/repos/base-okl4/src/include/bootinfo/internal/stdint.h
similarity index 100%
rename from repos/base-okl4/src/base/bootinfo/stdint.h
rename to repos/base-okl4/src/include/bootinfo/internal/stdint.h
diff --git a/repos/base-okl4/src/base/bootinfo/stdio.h b/repos/base-okl4/src/include/bootinfo/internal/stdio.h
similarity index 100%
rename from repos/base-okl4/src/base/bootinfo/stdio.h
rename to repos/base-okl4/src/include/bootinfo/internal/stdio.h
diff --git a/repos/base-pistachio/lib/mk/base-common.mk b/repos/base-pistachio/lib/mk/base-common.mk
index b21f8b4c33..ab9809275c 100644
--- a/repos/base-pistachio/lib/mk/base-common.mk
+++ b/repos/base-pistachio/lib/mk/base-common.mk
@@ -24,9 +24,7 @@ SRC_CC += thread/myself.cc
SRC_CC += thread/context_allocator.cc
SRC_CC += sleep.cc
-INC_DIR += $(REP_DIR)/src/base/lock
-INC_DIR += $(BASE_DIR)/src/base/lock
-INC_DIR += $(BASE_DIR)/src/base/thread
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
vpath cap_copy.cc $(BASE_DIR)/src/lib/startup
vpath %.cc $(REP_DIR)/src/base
diff --git a/repos/base-pistachio/lib/mk/base.mk b/repos/base-pistachio/lib/mk/base.mk
index 5e7bdf98c1..6510601ba0 100644
--- a/repos/base-pistachio/lib/mk/base.mk
+++ b/repos/base-pistachio/lib/mk/base.mk
@@ -13,7 +13,7 @@ SRC_CC += thread/thread_start.cc
SRC_CC += irq/platform.cc
SRC_CC += server/rpc_cap_alloc.cc
-INC_DIR += $(BASE_DIR)/src/base/env
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base
diff --git a/repos/base-pistachio/src/core/cpu_session_platform.cc b/repos/base-pistachio/src/core/cpu_session_platform.cc
index 727e5088cc..8d2f12c785 100644
--- a/repos/base-pistachio/src/core/cpu_session_platform.cc
+++ b/repos/base-pistachio/src/core/cpu_session_platform.cc
@@ -13,19 +13,10 @@
/* Genode includes */
#include
-#include
using namespace Genode;
using namespace Pistachio;
-// unsigned int Cpu_session_component::available_cpus()
-// {
-// if (_pinned_cpu == -1)
-// return L4_NumProcessors(get_kip());
-// else
-// return 1;
-// }
-
Ram_dataspace_capability Cpu_session_component::utcb(Thread_capability thread_cap)
{
PERR("%s: Not implemented", __PRETTY_FUNCTION__);
diff --git a/repos/base-pistachio/src/core/include/ipc_pager.h b/repos/base-pistachio/src/core/include/ipc_pager.h
index 36cc7e7a16..599dbaa713 100644
--- a/repos/base-pistachio/src/core/include/ipc_pager.h
+++ b/repos/base-pistachio/src/core/include/ipc_pager.h
@@ -20,7 +20,9 @@
#include
#include
#include
-#include
+
+/* core-local includes */
+#include
/* Pistachio includes */
namespace Pistachio {
diff --git a/repos/base-pistachio/include/pistachio/kip.h b/repos/base-pistachio/src/core/include/kip.h
similarity index 100%
rename from repos/base-pistachio/include/pistachio/kip.h
rename to repos/base-pistachio/src/core/include/kip.h
diff --git a/repos/base-pistachio/include/pistachio/thread_helper.h b/repos/base-pistachio/src/core/include/print_l4_thread_id.h
similarity index 75%
rename from repos/base-pistachio/include/pistachio/thread_helper.h
rename to repos/base-pistachio/src/core/include/print_l4_thread_id.h
index d67f42b3e4..0d941192bf 100644
--- a/repos/base-pistachio/include/pistachio/thread_helper.h
+++ b/repos/base-pistachio/src/core/include/print_l4_thread_id.h
@@ -1,5 +1,5 @@
/*
- * \brief Pistachio-specific thread helper functions
+ * \brief Pistachio-specific thread helper
* \author Julian Stecklina
* \date 2008-02-20
*/
@@ -11,16 +11,15 @@
* under the terms of the GNU General Public License version 2.
*/
-#ifndef _INCLUDE__PISTACHIO__THREAD_HELPER_H_
-#define _INCLUDE__PISTACHIO__THREAD_HELPER_H_
+#ifndef _INCLUDE__PISTACHIO__PRINT_L4_THREAD_ID_
+#define _INCLUDE__PISTACHIO__PRINT_L4_THREAD_ID_
#include
-namespace Pistachio
-{
+namespace Pistachio {
#include
- inline void print_l4_threadid(L4_ThreadId_t t)
+ inline void print_l4_thread_id(L4_ThreadId_t t)
{
if (L4_IsLocalId(t)) {
Genode::printf("THREAD (local) %02lx (raw %08lx)\n",
@@ -42,4 +41,4 @@ namespace Pistachio
}
}
-#endif /* _INCLUDE__PISTACHIO__THREAD_HELPER_H_ */
+#endif /* _INCLUDE__PISTACHIO__PRINT_L4_THREAD_ID_ */
diff --git a/repos/base-pistachio/src/core/include/util.h b/repos/base-pistachio/src/core/include/util.h
index 6ec49c9972..9c2f1107d2 100644
--- a/repos/base-pistachio/src/core/include/util.h
+++ b/repos/base-pistachio/src/core/include/util.h
@@ -19,9 +19,11 @@
#include
#include
#include
-#include
#include
+/* core-local includes */
+#include
+
/* Pistachio includes */
namespace Pistachio {
#include
diff --git a/repos/base-pistachio/src/core/io_mem_session_support.cc b/repos/base-pistachio/src/core/io_mem_session_support.cc
index 4e136a1f17..9ed3ee6897 100644
--- a/repos/base-pistachio/src/core/io_mem_session_support.cc
+++ b/repos/base-pistachio/src/core/io_mem_session_support.cc
@@ -13,10 +13,10 @@
*/
/* core includes */
-#include
#include
#include
#include
+#include
/* Pistachio includes */
namespace Pistachio {
diff --git a/repos/base-pistachio/src/base/kip/kip.cc b/repos/base-pistachio/src/core/kip.cc
similarity index 95%
rename from repos/base-pistachio/src/base/kip/kip.cc
rename to repos/base-pistachio/src/core/kip.cc
index 04c4db794e..61a580a68f 100644
--- a/repos/base-pistachio/src/base/kip/kip.cc
+++ b/repos/base-pistachio/src/core/kip.cc
@@ -11,7 +11,8 @@
* under the terms of the GNU General Public License version 2.
*/
-#include
+/* core-local includes */
+#include
using namespace Pistachio;
diff --git a/repos/base-pistachio/src/core/multiboot_info.cc b/repos/base-pistachio/src/core/multiboot_info.cc
index a30bcb3825..b95d9dd6dd 100644
--- a/repos/base-pistachio/src/core/multiboot_info.cc
+++ b/repos/base-pistachio/src/core/multiboot_info.cc
@@ -15,10 +15,10 @@
#include
#include
#include
-#include
/* core includes */
#include
+#include
/* Pistachio includes */
namespace Pistachio {
diff --git a/repos/base-pistachio/src/core/platform.cc b/repos/base-pistachio/src/core/platform.cc
index b11650042b..efd073d1e9 100644
--- a/repos/base-pistachio/src/core/platform.cc
+++ b/repos/base-pistachio/src/core/platform.cc
@@ -26,8 +26,8 @@
#include
#include
#include
-#include
-#include
+#include
+#include
/* Pistachio includes */
namespace Pistachio {
@@ -161,13 +161,13 @@ static void _core_pager_loop()
PDBG("Got page fault (pf_addr = %08lx, pf_ip = %08lx, flags = %08lx).",
pf_addr, pf_ip, flags);
- print_l4_threadid(L4_GlobalId(t));
+ print_l4_thread_id(L4_GlobalId(t));
/* check for NULL pointer */
if (pf_addr < page_size) {
PERR("possible null pointer %s at address %lx at EIP %lx in",
is_write_fault(flags) ? "WRITE" : "READ/EXEC", pf_addr, pf_ip);
- print_l4_threadid(t);
+ print_l4_thread_id(t);
/* do not unblock faulter */
break;
} else if (!_core_address_ranges().valid_addr(pf_addr)) {
@@ -175,12 +175,12 @@ static void _core_pager_loop()
PERR("%s access outside of RAM at %lx IP %lx",
is_write_fault(flags) ? "WRITE" : "READ", pf_addr, pf_ip);
- print_l4_threadid(t);
+ print_l4_thread_id(t);
/* do not unblock faulter */
break;
} else if (verbose_core_pf) {
PDBG("pfa=%lx ip=%lx in", pf_addr, pf_ip);
- print_l4_threadid(t);
+ print_l4_thread_id(t);
}
/* my pf handler is sigma0 - just touch the appropriate page */
diff --git a/repos/base-pistachio/src/core/platform_thread.cc b/repos/base-pistachio/src/core/platform_thread.cc
index e0b75699b0..aacb4f6863 100644
--- a/repos/base-pistachio/src/core/platform_thread.cc
+++ b/repos/base-pistachio/src/core/platform_thread.cc
@@ -14,12 +14,11 @@
/* Genode includes */
#include
#include
-#include
-#include
/* core includes */
#include
#include
+#include
/* Pistachio includes */
namespace Pistachio
diff --git a/repos/base-pistachio/src/core/spec/x86/platform_x86.cc b/repos/base-pistachio/src/core/spec/x86/platform_x86.cc
index c3fd845d7f..9285edd37a 100644
--- a/repos/base-pistachio/src/core/spec/x86/platform_x86.cc
+++ b/repos/base-pistachio/src/core/spec/x86/platform_x86.cc
@@ -1,7 +1,7 @@
/*
* \brief Platform support specific to x86
* \author Christian Helmuth
- * \date 2006-04-11
+ * \date 2006-04-11
*/
/*
@@ -11,8 +11,8 @@
* under the terms of the GNU General Public License version 2.
*/
-#include
-#include
+/* core-local includes */
+#include
#include "platform.h"
#include "util.h"
diff --git a/repos/base-pistachio/src/core/target.inc b/repos/base-pistachio/src/core/target.inc
index d6f018e3b5..0b40236e67 100644
--- a/repos/base-pistachio/src/core/target.inc
+++ b/repos/base-pistachio/src/core/target.inc
@@ -37,10 +37,8 @@ SRC_CC = context_area.cc \
thread_start.cc \
trace_session_component.cc
-INC_DIR += $(REP_DIR)/src/core/include \
- $(REP_DIR)/src/base/console \
- $(BASE_DIR)/src/base/thread \
- $(GEN_CORE_DIR)/include
+INC_DIR += $(REP_DIR)/src/core/include $(GEN_CORE_DIR)/include \
+ $(REP_DIR)/src/include $(BASE_DIR)/src/include
include $(GEN_CORE_DIR)/version.inc
diff --git a/repos/base-pistachio/src/base/console/core_console.h b/repos/base-pistachio/src/include/base/internal/core_console.h
similarity index 100%
rename from repos/base-pistachio/src/base/console/core_console.h
rename to repos/base-pistachio/src/include/base/internal/core_console.h
diff --git a/repos/base-pistachio/src/base/lock/lock_helper.h b/repos/base-pistachio/src/include/base/internal/lock_helper.h
similarity index 100%
rename from repos/base-pistachio/src/base/lock/lock_helper.h
rename to repos/base-pistachio/src/include/base/internal/lock_helper.h
diff --git a/repos/base-sel4/lib/mk/base-common.inc b/repos/base-sel4/lib/mk/base-common.inc
index 552eaff36f..3a6856d6e8 100644
--- a/repos/base-sel4/lib/mk/base-common.inc
+++ b/repos/base-sel4/lib/mk/base-common.inc
@@ -26,9 +26,7 @@ SRC_CC += thread/thread_bootstrap.cc
SRC_CC += env/capability.cc
SRC_CC += sleep.cc
-INC_DIR += $(REP_DIR)/src/base
-INC_DIR += $(REP_DIR)/src/base/lock
-INC_DIR += $(BASE_DIR)/src/base/thread
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base
diff --git a/repos/base-sel4/lib/mk/base.mk b/repos/base-sel4/lib/mk/base.mk
index 9c2acb3a6e..3e7838faba 100644
--- a/repos/base-sel4/lib/mk/base.mk
+++ b/repos/base-sel4/lib/mk/base.mk
@@ -13,8 +13,7 @@ SRC_CC += thread/thread_start.cc thread/thread_init.cc
SRC_CC += irq/platform.cc
SRC_CC += server/rpc_cap_alloc.cc
-INC_DIR += $(REP_DIR)/src/base
-INC_DIR += $(BASE_DIR)/src/base/env
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base
diff --git a/repos/base-sel4/lib/mk/core.mk b/repos/base-sel4/lib/mk/core.mk
index 761c611537..6801ce336c 100644
--- a/repos/base-sel4/lib/mk/core.mk
+++ b/repos/base-sel4/lib/mk/core.mk
@@ -37,10 +37,8 @@ SRC_CC += \
LIBS += core_printf base-common syscall
-INC_DIR += $(REP_DIR)/src/core/include \
- $(GEN_CORE_DIR)/include \
- $(REP_DIR)/src/base \
- $(BASE_DIR)/src/base/thread
+INC_DIR += $(REP_DIR)/src/core/include $(GEN_CORE_DIR)/include \
+ $(REP_DIR)/src/include $(BASE_DIR)/src/include
include $(GEN_CORE_DIR)/version.inc
diff --git a/repos/base-sel4/lib/mk/core_printf.mk b/repos/base-sel4/lib/mk/core_printf.mk
index ebeadf7b10..d5303f8619 100644
--- a/repos/base-sel4/lib/mk/core_printf.mk
+++ b/repos/base-sel4/lib/mk/core_printf.mk
@@ -1,5 +1,5 @@
SRC_CC = core_printf.cc
-INC_DIR += $(REP_DIR)/src/base/console
+INC_DIR += $(REP_DIR)/src/include
LIBS += syscall
vpath core_printf.cc $(BASE_DIR)/src/base/console
diff --git a/repos/base-sel4/lib/mk/spec/x86_32/startup.mk b/repos/base-sel4/lib/mk/spec/x86_32/startup.mk
index fe0a8cf972..5b76cbfba5 100644
--- a/repos/base-sel4/lib/mk/spec/x86_32/startup.mk
+++ b/repos/base-sel4/lib/mk/spec/x86_32/startup.mk
@@ -1,9 +1,9 @@
#
-# Make the includes of src/base/internal/ available to the startup lib. This is
+# Make the includes of src/base/include/ available to the startup lib. This is
# needed because the seL4-specific src/platform/_main_parent_cap.h as included
-# by the startup lib depends on the internal/capability_space_sel4.h.
+# by the startup lib depends on base/internal/capability_space_sel4.h.
#
-INC_DIR += $(REP_DIR)/src/base
+INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include
include $(BASE_DIR)/lib/mk/startup.inc
diff --git a/repos/base-sel4/src/base/env/capability.cc b/repos/base-sel4/src/base/env/capability.cc
index 3ac3da9194..6c9093f123 100644
--- a/repos/base-sel4/src/base/env/capability.cc
+++ b/repos/base-sel4/src/base/env/capability.cc
@@ -15,8 +15,8 @@
#include
/* base-internal includes */
-#include
-#include
+#include
+#include
using namespace Genode;
diff --git a/repos/base-sel4/src/base/env/capability_space.cc b/repos/base-sel4/src/base/env/capability_space.cc
index 8f967b5fb1..4e5d60e442 100644
--- a/repos/base-sel4/src/base/env/capability_space.cc
+++ b/repos/base-sel4/src/base/env/capability_space.cc
@@ -16,8 +16,8 @@
#include
/* base-internal includes */
-#include
-#include
+#include
+#include
/**
* Definition of capability meta data
diff --git a/repos/base-sel4/src/base/ipc/ipc.cc b/repos/base-sel4/src/base/ipc/ipc.cc
index 4a77585b92..91f3999b94 100644
--- a/repos/base-sel4/src/base/ipc/ipc.cc
+++ b/repos/base-sel4/src/base/ipc/ipc.cc
@@ -19,8 +19,8 @@
#include
/* base-internal includes */
-#include
-#include
+#include
+#include
/* seL4 includes */
#include
diff --git a/repos/base-sel4/src/base/server/server.cc b/repos/base-sel4/src/base/server/server.cc
index 26ffa031b3..371f923e12 100644
--- a/repos/base-sel4/src/base/server/server.cc
+++ b/repos/base-sel4/src/base/server/server.cc
@@ -17,9 +17,11 @@
*/
/* Genode includes */
-#include
#include
+/* base-internal includes */
+#include
+
using namespace Genode;
diff --git a/repos/base-sel4/src/core/capability_space.cc b/repos/base-sel4/src/core/capability_space.cc
index 8595e39d3d..79fd322bea 100644
--- a/repos/base-sel4/src/core/capability_space.cc
+++ b/repos/base-sel4/src/core/capability_space.cc
@@ -16,8 +16,8 @@
#include
/* base-internal includes */
-#include
-#include
+#include
+#include
/* core includes */
#include
diff --git a/repos/base-sel4/src/core/include/cap_sel_alloc.h b/repos/base-sel4/src/core/include/cap_sel_alloc.h
index 5305bc9530..28e12d6d40 100644
--- a/repos/base-sel4/src/core/include/cap_sel_alloc.h
+++ b/repos/base-sel4/src/core/include/cap_sel_alloc.h
@@ -18,7 +18,7 @@
#include
/* base-internal includes */
-#include
+#include
namespace Genode { struct Cap_sel_alloc; }
diff --git a/repos/base-sel4/src/core/include/core_capability_data.h b/repos/base-sel4/src/core/include/core_capability_data.h
index a82f4b9e71..f4d0835dc0 100644
--- a/repos/base-sel4/src/core/include/core_capability_data.h
+++ b/repos/base-sel4/src/core/include/core_capability_data.h
@@ -15,7 +15,7 @@
#define _CORE__INCLUDE__CAPABILITY_CORE_DATA_H_
/* base-internal includes */
-#include
+#include
namespace Genode {
diff --git a/repos/base-sel4/src/core/include/core_capability_space.h b/repos/base-sel4/src/core/include/core_capability_space.h
index a630aa22a4..0eb5db185c 100644
--- a/repos/base-sel4/src/core/include/core_capability_space.h
+++ b/repos/base-sel4/src/core/include/core_capability_space.h
@@ -15,7 +15,7 @@
#define _CORE__INCLUDE__CORE_CAPABILITY_SPACE_H_
/* base-internal includes */
-#include
+#include
namespace Genode { class Pd_session; }
diff --git a/repos/base-sel4/src/core/include/platform_pd.h b/repos/base-sel4/src/core/include/platform_pd.h
index 331d3c79e8..eca19553f7 100644
--- a/repos/base-sel4/src/core/include/platform_pd.h
+++ b/repos/base-sel4/src/core/include/platform_pd.h
@@ -23,7 +23,7 @@
#include
/* base-internal includes */
-#include
+#include
namespace Genode { class Platform_pd; }
diff --git a/repos/base-sel4/src/core/include/thread_sel4.h b/repos/base-sel4/src/core/include/thread_sel4.h
index 5bb3c20c29..bb6852c87d 100644
--- a/repos/base-sel4/src/core/include/thread_sel4.h
+++ b/repos/base-sel4/src/core/include/thread_sel4.h
@@ -21,7 +21,7 @@
#include
/* base-internal includes */
-#include
+#include
/* core includes */
#include
diff --git a/repos/base-sel4/src/core/pager.cc b/repos/base-sel4/src/core/pager.cc
index a19ff87c91..3603d1460a 100644
--- a/repos/base-sel4/src/core/pager.cc
+++ b/repos/base-sel4/src/core/pager.cc
@@ -20,7 +20,7 @@
#include
/* base-internal includes */
-#include
+#include
/* seL4 includes */
#include
diff --git a/repos/base-sel4/src/core/platform_pd.cc b/repos/base-sel4/src/core/platform_pd.cc
index 13af582b26..3108e6b9cf 100644
--- a/repos/base-sel4/src/core/platform_pd.cc
+++ b/repos/base-sel4/src/core/platform_pd.cc
@@ -22,7 +22,7 @@
#include
/* base-internal includes */
-#include
+#include
using namespace Genode;
diff --git a/repos/base-sel4/src/core/platform_thread.cc b/repos/base-sel4/src/core/platform_thread.cc
index 98c2cd0371..acf2f81fc3 100644
--- a/repos/base-sel4/src/core/platform_thread.cc
+++ b/repos/base-sel4/src/core/platform_thread.cc
@@ -20,7 +20,7 @@
#include
/* base-internal includes */
-#include
+#include
using namespace Genode;
diff --git a/repos/base-sel4/src/base/internal/assert.h b/repos/base-sel4/src/include/base/internal/assert.h
similarity index 95%
rename from repos/base-sel4/src/base/internal/assert.h
rename to repos/base-sel4/src/include/base/internal/assert.h
index 9a1bebf684..6488f6f19b 100644
--- a/repos/base-sel4/src/base/internal/assert.h
+++ b/repos/base-sel4/src/include/base/internal/assert.h
@@ -21,7 +21,7 @@
#include
/* base-internal includes */
-#include
+#include
#define ASSERT(e) \
do { if (!(e)) { \
diff --git a/repos/base-sel4/src/base/internal/capability_data.h b/repos/base-sel4/src/include/base/internal/capability_data.h
similarity index 96%
rename from repos/base-sel4/src/base/internal/capability_data.h
rename to repos/base-sel4/src/include/base/internal/capability_data.h
index 2d27f238f5..1ad9f4e46a 100644
--- a/repos/base-sel4/src/base/internal/capability_data.h
+++ b/repos/base-sel4/src/include/base/internal/capability_data.h
@@ -19,7 +19,7 @@
#include
/* base-internal includes */
-#include
+#include
namespace Genode { class Capability_data; }
diff --git a/repos/base-sel4/src/base/internal/capability_space.h b/repos/base-sel4/src/include/base/internal/capability_space.h
similarity index 96%
rename from repos/base-sel4/src/base/internal/capability_space.h
rename to repos/base-sel4/src/include/base/internal/capability_space.h
index 55feaa4eae..98518e9d38 100644
--- a/repos/base-sel4/src/base/internal/capability_space.h
+++ b/repos/base-sel4/src/include/base/internal/capability_space.h
@@ -23,7 +23,7 @@
#include
/* base-internal includes */
-#include
+#include
namespace Genode { namespace Capability_space {
diff --git a/repos/base-sel4/src/base/internal/capability_space_sel4.h b/repos/base-sel4/src/include/base/internal/capability_space_sel4.h
similarity index 98%
rename from repos/base-sel4/src/base/internal/capability_space_sel4.h
rename to repos/base-sel4/src/include/base/internal/capability_space_sel4.h
index 793c05a57e..098b046fa3 100644
--- a/repos/base-sel4/src/base/internal/capability_space_sel4.h
+++ b/repos/base-sel4/src/include/base/internal/capability_space_sel4.h
@@ -19,8 +19,8 @@
#include
/* base-internal includes */
-#include
-#include
+#include
+#include
namespace Genode {
diff --git a/repos/base-sel4/src/base/console/core_console.h b/repos/base-sel4/src/include/base/internal/core_console.h
similarity index 100%
rename from repos/base-sel4/src/base/console/core_console.h
rename to repos/base-sel4/src/include/base/internal/core_console.h
diff --git a/repos/base-sel4/src/base/internal/kernel_debugger.h b/repos/base-sel4/src/include/base/internal/kernel_debugger.h
similarity index 100%
rename from repos/base-sel4/src/base/internal/kernel_debugger.h
rename to repos/base-sel4/src/include/base/internal/kernel_debugger.h
diff --git a/repos/base-sel4/src/base/lock/lock_helper.h b/repos/base-sel4/src/include/base/internal/lock_helper.h
similarity index 100%
rename from repos/base-sel4/src/base/lock/lock_helper.h
rename to repos/base-sel4/src/include/base/internal/lock_helper.h
diff --git a/repos/base-sel4/src/base/internal/native_types.h b/repos/base-sel4/src/include/base/internal/native_types.h
similarity index 100%
rename from repos/base-sel4/src/base/internal/native_types.h
rename to repos/base-sel4/src/include/base/internal/native_types.h
diff --git a/repos/base-sel4/src/base/internal/rpc_obj_key.h b/repos/base-sel4/src/include/base/internal/rpc_obj_key.h
similarity index 100%
rename from repos/base-sel4/src/base/internal/rpc_obj_key.h
rename to repos/base-sel4/src/include/base/internal/rpc_obj_key.h
diff --git a/repos/base-sel4/src/lib/startup/_main_parent_cap.h b/repos/base-sel4/src/include/startup/internal/_main_parent_cap.h
similarity index 94%
rename from repos/base-sel4/src/lib/startup/_main_parent_cap.h
rename to repos/base-sel4/src/include/startup/internal/_main_parent_cap.h
index 72d031d441..5bc0bd6cda 100644
--- a/repos/base-sel4/src/lib/startup/_main_parent_cap.h
+++ b/repos/base-sel4/src/include/startup/internal/_main_parent_cap.h
@@ -18,7 +18,7 @@
#include
/* base-internal includes */
-#include
+#include
namespace Genode {
diff --git a/repos/base/include/spec/x86/bios_data_area.h b/repos/base/include/spec/x86/bios_data_area.h
index 109f67f37e..7c2561a015 100644
--- a/repos/base/include/spec/x86/bios_data_area.h
+++ b/repos/base/include/spec/x86/bios_data_area.h
@@ -17,8 +17,8 @@
/* Genode includes */
#include
-/* base includes */
-#include
+/* base-internal includes */
+#include
namespace Genode { class Bios_data_area; }
diff --git a/repos/base/lib/mk/startup.inc b/repos/base/lib/mk/startup.inc
index 828ff74961..42fe298249 100644
--- a/repos/base/lib/mk/startup.inc
+++ b/repos/base/lib/mk/startup.inc
@@ -1,6 +1,6 @@
SRC_S += crt0.s
SRC_CC += _main.cc init_main_thread.cc
-REP_INC_DIR += src/lib/startup
+REP_INC_DIR += src/include
LIBS += syscall
vpath %.cc $(BASE_DIR)/src/lib/startup
diff --git a/repos/base/src/base/console/core_printf.cc b/repos/base/src/base/console/core_printf.cc
index 1c12370f1d..b0ec88f7ef 100644
--- a/repos/base/src/base/console/core_printf.cc
+++ b/repos/base/src/base/console/core_printf.cc
@@ -20,10 +20,13 @@
* under the terms of the GNU General Public License version 2.
*/
-#include /* provides 'Core_console' */
+/* Genode includes */
#include
#include
+/* base-internal includes */
+#include
+
using namespace Genode;
diff --git a/repos/base/src/base/elf/elf_binary.cc b/repos/base/src/base/elf/elf_binary.cc
index f96e011094..50e77d829c 100644
--- a/repos/base/src/base/elf/elf_binary.cc
+++ b/repos/base/src/base/elf/elf_binary.cc
@@ -18,8 +18,8 @@
#include
#include
-/* local includes */
-#include "elf.h"
+/* base-internal includes */
+#include
using namespace Genode;
diff --git a/repos/base/src/base/env/context_area.cc b/repos/base/src/base/env/context_area.cc
index aa60debc4f..c4047b3fc1 100644
--- a/repos/base/src/base/env/context_area.cc
+++ b/repos/base/src/base/env/context_area.cc
@@ -11,10 +11,11 @@
* under the terms of the GNU General Public License version 2.
*/
+/* Genode includes */
#include
-#include
-#include
-#include
+
+/* base-internal includes */
+#include
using namespace Genode;
diff --git a/repos/base/src/base/env/env.cc b/repos/base/src/base/env/env.cc
index 5554b140a3..a9b5d0da32 100644
--- a/repos/base/src/base/env/env.cc
+++ b/repos/base/src/base/env/env.cc
@@ -12,7 +12,7 @@
* under the terms of the GNU General Public License version 2.
*/
-#include
+#include
namespace Genode {
diff --git a/repos/base/src/base/env/reinitialize.cc b/repos/base/src/base/env/reinitialize.cc
index d274c863f8..e264be7944 100644
--- a/repos/base/src/base/env/reinitialize.cc
+++ b/repos/base/src/base/env/reinitialize.cc
@@ -12,8 +12,8 @@
* under the terms of the GNU General Public License version 2.
*/
-/* env includes */
-#include
+/* base-internal includes */
+#include
/* Genode includes */
#include
diff --git a/repos/base/src/base/lock/lock.cc b/repos/base/src/base/lock/lock.cc
index 5b6c3e0802..bd3d500df5 100644
--- a/repos/base/src/base/lock/lock.cc
+++ b/repos/base/src/base/lock/lock.cc
@@ -15,8 +15,8 @@
#include
#include
-/* local includes */
-#include
+/* base-internal includes */
+#include
using namespace Genode;
diff --git a/repos/base/src/base/thread/trace.cc b/repos/base/src/base/thread/trace.cc
index d5786ae434..25d7b864de 100644
--- a/repos/base/src/base/thread/trace.cc
+++ b/repos/base/src/base/thread/trace.cc
@@ -19,7 +19,7 @@
#include
/* local includes */
-#include
+#include
using namespace Genode;
diff --git a/repos/base/src/core/include/trace/control_area.h b/repos/base/src/core/include/trace/control_area.h
index a0ab6b37b3..4d6b048e4d 100644
--- a/repos/base/src/core/include/trace/control_area.h
+++ b/repos/base/src/core/include/trace/control_area.h
@@ -18,7 +18,7 @@
#include
/* base-internal includes */
-#include
+#include
namespace Genode { namespace Trace { class Control_area; } }
diff --git a/repos/base/src/core/include/trace/source_registry.h b/repos/base/src/core/include/trace/source_registry.h
index d503969fc6..49e219ae81 100644
--- a/repos/base/src/core/include/trace/source_registry.h
+++ b/repos/base/src/core/include/trace/source_registry.h
@@ -21,7 +21,7 @@
#include
/* base-internal include */
-#include
+#include
namespace Genode { namespace Trace {
class Source;
diff --git a/repos/base/src/core/include/trace/subject_registry.h b/repos/base/src/core/include/trace/subject_registry.h
index caafcb27f3..ad063690a3 100644
--- a/repos/base/src/core/include/trace/subject_registry.h
+++ b/repos/base/src/core/include/trace/subject_registry.h
@@ -32,7 +32,7 @@
#include
/* base-internal include */
-#include
+#include
namespace Genode { namespace Trace {
class Subject;
diff --git a/repos/base/src/base/elf/elf.h b/repos/base/src/include/base/internal/elf_format.h
similarity index 100%
rename from repos/base/src/base/elf/elf.h
rename to repos/base/src/include/base/internal/elf_format.h
diff --git a/repos/base/src/base/env/platform_env.h b/repos/base/src/include/base/internal/platform_env.h
similarity index 98%
rename from repos/base/src/base/env/platform_env.h
rename to repos/base/src/include/base/internal/platform_env.h
index 58192ffd5d..235445624d 100644
--- a/repos/base/src/base/env/platform_env.h
+++ b/repos/base/src/include/base/internal/platform_env.h
@@ -25,8 +25,8 @@
#include
#include
-/* local includes */
-#include
+/* base-internal includes */
+#include
namespace Genode {
diff --git a/repos/base/src/base/env/platform_env_common.h b/repos/base/src/include/base/internal/platform_env_common.h
similarity index 100%
rename from repos/base/src/base/env/platform_env_common.h
rename to repos/base/src/include/base/internal/platform_env_common.h
diff --git a/repos/base/src/base/lock/spin_lock.h b/repos/base/src/include/base/internal/spin_lock.h
similarity index 94%
rename from repos/base/src/base/lock/spin_lock.h
rename to repos/base/src/include/base/internal/spin_lock.h
index ff1cbf793d..17e25499ef 100644
--- a/repos/base/src/base/lock/spin_lock.h
+++ b/repos/base/src/include/base/internal/spin_lock.h
@@ -19,8 +19,8 @@
#include
#include
-/* local includes */
-#include
+/* base-internal includes */
+#include
/*
* Spinlock functions used for protecting the critical sections within the
diff --git a/repos/base/src/base/thread/trace/control.h b/repos/base/src/include/base/internal/trace_control.h
similarity index 100%
rename from repos/base/src/base/thread/trace/control.h
rename to repos/base/src/include/base/internal/trace_control.h
diff --git a/repos/base/src/base/include/unmanaged_singleton.h b/repos/base/src/include/base/internal/unmanaged_singleton.h
similarity index 100%
rename from repos/base/src/base/include/unmanaged_singleton.h
rename to repos/base/src/include/base/internal/unmanaged_singleton.h
diff --git a/repos/base/src/lib/startup/_main_parent_cap.h b/repos/base/src/include/startup/internal/_main_parent_cap.h
similarity index 100%
rename from repos/base/src/lib/startup/_main_parent_cap.h
rename to repos/base/src/include/startup/internal/_main_parent_cap.h
diff --git a/repos/base/src/lib/startup/_main.cc b/repos/base/src/lib/startup/_main.cc
index ddd068c3ba..1d04ab108f 100644
--- a/repos/base/src/lib/startup/_main.cc
+++ b/repos/base/src/lib/startup/_main.cc
@@ -25,7 +25,7 @@
#include
/* platform-specific local helper functions */
-#include <_main_parent_cap.h>
+#include
using namespace Genode;
diff --git a/repos/ports-foc/lib/mk/l4lx.mk b/repos/ports-foc/lib/mk/l4lx.mk
index ea9a52f0e8..7bb422c4a8 100644
--- a/repos/ports-foc/lib/mk/l4lx.mk
+++ b/repos/ports-foc/lib/mk/l4lx.mk
@@ -33,6 +33,9 @@ SRC_CC += env.cc \
INC_DIR += $(REP_DIR)/include \
$(REP_DIR)/src/lib/l4lx/include \
+# for reusing the 'Expanding_rm_session' from the platform env in dataspace.h
+INC_DIR += $(BASE_DIR)/src/include
+
LIBS = base config
vpath %.cc $(REP_DIR)/src/lib/l4lx
diff --git a/repos/ports-foc/src/lib/l4lx/startup.cc b/repos/ports-foc/src/lib/l4lx/startup.cc
index f7f72ff505..b1b429ab78 100644
--- a/repos/ports-foc/src/lib/l4lx/startup.cc
+++ b/repos/ports-foc/src/lib/l4lx/startup.cc
@@ -12,7 +12,6 @@
*/
/* Genode includes */
-#include
#include
#include
#include