summaryrefslogtreecommitdiffstats
path: root/c/src/exec/sapi
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-04 18:05:09 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-04 18:05:09 +0000
commitf817b0283cce904d0bcb48cf9e641c2b40ba8f38 (patch)
treef8d686387ff9cf0639e38887ad23aef46e57db94 /c/src/exec/sapi
parentAdded first stab at mkgnatnewlib. (diff)
downloadrtems-f817b0283cce904d0bcb48cf9e641c2b40ba8f38.tar.bz2
The files in libcpu should not be directly dependent on any BSP. In
particular, using bsp.h, or getting information from the BSP which should properly be obtained from RTEMS is forbidden. This is necessary to strengthen the division between the BSP independent parts of RTEMS and the BSPs themselves. This started after comments and analysis by Ralf Corsepius <corsepiu@faw.uni-ulm.de>. The changes primarily eliminated the need to include bsp.h and peeking at BSP_Configuration. The use of Cpu_table in each BSP needs to be eliminated.
Diffstat (limited to 'c/src/exec/sapi')
-rw-r--r--c/src/exec/sapi/include/rtems/config.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/c/src/exec/sapi/include/rtems/config.h b/c/src/exec/sapi/include/rtems/config.h
index ac2da06d97..8a2def6082 100644
--- a/c/src/exec/sapi/include/rtems/config.h
+++ b/c/src/exec/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