base: uniform base-internal header structure
This patch establishes a common organization of header files internal to the base framework. The internal headers are located at '<repository>/src/include/base/internal/'. This structure has been choosen to make the nature of those headers immediately clear when included: #include <base/internal/lock_helper.h> Issue #1832
This commit is contained in:
committed by
Christian Helmuth
parent
be496c6dc1
commit
e6729316ff
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -13,19 +13,10 @@
|
||||
|
||||
/* Genode includes */
|
||||
#include <cpu_session_component.h>
|
||||
#include <pistachio/kip.h>
|
||||
|
||||
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__);
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
#include <base/ipc.h>
|
||||
#include <base/stdint.h>
|
||||
#include <util/touch.h>
|
||||
#include <pistachio/kip.h>
|
||||
|
||||
/* core-local includes */
|
||||
#include <kip.h>
|
||||
|
||||
/* Pistachio includes */
|
||||
namespace Pistachio {
|
||||
|
||||
@@ -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 <base/printf.h>
|
||||
|
||||
namespace Pistachio
|
||||
{
|
||||
namespace Pistachio {
|
||||
#include <l4/types.h>
|
||||
|
||||
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_ */
|
||||
@@ -19,9 +19,11 @@
|
||||
#include <base/printf.h>
|
||||
#include <rm_session/rm_session.h>
|
||||
#include <util/touch.h>
|
||||
#include <pistachio/kip.h>
|
||||
#include <base/native_types.h>
|
||||
|
||||
/* core-local includes */
|
||||
#include <kip.h>
|
||||
|
||||
/* Pistachio includes */
|
||||
namespace Pistachio {
|
||||
#include <l4/types.h>
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
*/
|
||||
|
||||
/* core includes */
|
||||
#include <pistachio/kip.h>
|
||||
#include <platform.h>
|
||||
#include <util.h>
|
||||
#include <io_mem_session_component.h>
|
||||
#include <kip.h>
|
||||
|
||||
/* Pistachio includes */
|
||||
namespace Pistachio {
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
* under the terms of the GNU General Public License version 2.
|
||||
*/
|
||||
|
||||
#include <pistachio/kip.h>
|
||||
/* core-local includes */
|
||||
#include <kip.h>
|
||||
|
||||
using namespace Pistachio;
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
#include <base/printf.h>
|
||||
#include <multiboot.h>
|
||||
#include <util/misc_math.h>
|
||||
#include <pistachio/kip.h>
|
||||
|
||||
/* core includes */
|
||||
#include <util.h>
|
||||
#include <kip.h>
|
||||
|
||||
/* Pistachio includes */
|
||||
namespace Pistachio {
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
#include <platform_thread.h>
|
||||
#include <platform_pd.h>
|
||||
#include <util.h>
|
||||
#include <pistachio/thread_helper.h>
|
||||
#include <pistachio/kip.h>
|
||||
#include <kip.h>
|
||||
#include <print_l4_thread_id.h>
|
||||
|
||||
/* 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 */
|
||||
|
||||
@@ -14,12 +14,11 @@
|
||||
/* Genode includes */
|
||||
#include <base/printf.h>
|
||||
#include <util/string.h>
|
||||
#include <pistachio/thread_helper.h>
|
||||
#include <pistachio/kip.h>
|
||||
|
||||
/* core includes */
|
||||
#include <platform_pd.h>
|
||||
#include <platform_thread.h>
|
||||
#include <kip.h>
|
||||
|
||||
/* Pistachio includes */
|
||||
namespace Pistachio
|
||||
|
||||
@@ -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 <pistachio/thread_helper.h>
|
||||
#include <pistachio/kip.h>
|
||||
/* core-local includes */
|
||||
#include <kip.h>
|
||||
|
||||
#include "platform.h"
|
||||
#include "util.h"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user