summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/rtems/include/rtems.h1
-rw-r--r--cpukit/sapi/include/rtems/config.h46
-rw-r--r--cpukit/score/cpu/mips/rtems/score/cpu.h5
-rw-r--r--cpukit/score/cpu/mips64orion/rtems/score/cpu.h5
4 files changed, 54 insertions, 3 deletions
diff --git a/cpukit/rtems/include/rtems.h b/cpukit/rtems/include/rtems.h
index 01c0b8478b..0db253f086 100644
--- a/cpukit/rtems/include/rtems.h
+++ b/cpukit/rtems/include/rtems.h
@@ -114,7 +114,6 @@ extern "C" {
#define RTEMS_MINIMUN_HETERO_CONVERSION MP_PACKET_MINIMUN_HETERO_CONVERSION
-
#ifdef __cplusplus
}
#endif
diff --git a/cpukit/sapi/include/rtems/config.h b/cpukit/sapi/include/rtems/config.h
index ac2da06d97..8a2def6082 100644
--- a/cpukit/sapi/include/rtems/config.h
+++ b/cpukit/sapi/include/rtems/config.h
@@ -116,6 +116,52 @@ typedef struct {
SAPI_EXTERN rtems_configuration_table *_Configuration_Table;
SAPI_EXTERN rtems_multiprocessing_table *_Configuration_MP_table;
+/*
+ * Some handy macros to avoid dependencies on either the BSP
+ * or the exact format of the configuration table.
+ */
+
+#define rtems_configuration_get_work_space_start() \
+ (_Configuration_Table->work_space_start)
+
+#define rtems_configuration_get_work_space_size() \
+ (_Configuration_Table->work_space_size)
+
+#define rtems_configuration_get_maximum_extensions() \
+ (_Configuration_Table->maximum_extensions)
+
+#define rtems_configuration_get_microseconds_per_tick() \
+ (_Configuration_Table->microseconds_per_tick)
+#define rtems_configuration_get_milliseconds_per_tick() \
+ (_Configuration_Table->microseconds_per_tick / 1000)
+
+#define rtems_configuration_get_ticks_per_timeslice() \
+ (_Configuration_Table->ticks_per_timeslice)
+
+#define rtems_configuration_get_maximum_devices() \
+ (_Configuration_Table->maximum_devices)
+
+#define rtems_configuration_get_number_of_device_drivers() \
+ (_Configuration_Table->number_of_device_drivers)
+
+#define rtems_configuration_get_device_driver_table() \
+ (_Configuration_Table->device_driver_table)
+
+#define rtems_configuration_get_number_of_initial_extensions() \
+ (_Configuration_Table->number_of_initial_extensions)
+
+#define rtems_configuration_get_user_extension_table() \
+ (_Configuration_Table->user_extension_table)
+
+#define rtems_configuration_get_user_multiprocessing_table() \
+ (_Configuration_Table->user_multiprocessing_table)
+
+#define rtems_configuration_get_rtems_api_configuration() \
+ (_Configuration_Table->rtems_api_configuration)
+
+#define rtems_configuration_get_posix_api_configuration() \
+ (_Configuration_Table->posix_api_configuration)
+
#ifdef __cplusplus
}
#endif
diff --git a/cpukit/score/cpu/mips/rtems/score/cpu.h b/cpukit/score/cpu/mips/rtems/score/cpu.h
index ba0e15ab10..0722a81ca6 100644
--- a/cpukit/score/cpu/mips/rtems/score/cpu.h
+++ b/cpukit/score/cpu/mips/rtems/score/cpu.h
@@ -435,9 +435,12 @@ typedef struct {
void (*stack_free_hook)( void* );
/* end of fields required on all CPUs */
- unsigned32 some_other_cpu_dependent_info;
+ unsigned32 clicks_per_microsecond;
} rtems_cpu_table;
+#define rtems_cpu_configuration_get_clicks_per_microsecond() \
+ (_CPU_Table.clicks_per_microsecond)
+
/*
* This variable is optional. It is used on CPUs on which it is difficult
* to generate an "uninitialized" FP context. It is filled in by
diff --git a/cpukit/score/cpu/mips64orion/rtems/score/cpu.h b/cpukit/score/cpu/mips64orion/rtems/score/cpu.h
index ba0e15ab10..0722a81ca6 100644
--- a/cpukit/score/cpu/mips64orion/rtems/score/cpu.h
+++ b/cpukit/score/cpu/mips64orion/rtems/score/cpu.h
@@ -435,9 +435,12 @@ typedef struct {
void (*stack_free_hook)( void* );
/* end of fields required on all CPUs */
- unsigned32 some_other_cpu_dependent_info;
+ unsigned32 clicks_per_microsecond;
} rtems_cpu_table;
+#define rtems_cpu_configuration_get_clicks_per_microsecond() \
+ (_CPU_Table.clicks_per_microsecond)
+
/*
* This variable is optional. It is used on CPUs on which it is difficult
* to generate an "uninitialized" FP context. It is filled in by