summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-05 16:44:02 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-05 16:44:02 +0000
commit458bd343e24cda7169c75f079705979891c9abc1 (patch)
treea9e584c28211674b28d1e37aec005e0e3a25afa1 /cpukit/score/include
parentEliminated references to stack checker related #defines. (diff)
downloadrtems-458bd343e24cda7169c75f079705979891c9abc1.tar.bz2
This is another pass at making sure that nothing outside the BSP
unnecessarily uses any variables defined by the BSP. On this sweep, use of BSP_Configuration and Cpu_table was eliminated. A significant part of this modification was the addition of macros to access fields in the RTEMS configuration structures. 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>.
Diffstat (limited to 'cpukit/score/include')
-rw-r--r--cpukit/score/include/rtems/system.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/system.h b/cpukit/score/include/rtems/system.h
index 5e1cc80ed5..4d7f550141 100644
--- a/cpukit/score/include/rtems/system.h
+++ b/cpukit/score/include/rtems/system.h
@@ -140,6 +140,46 @@ extern const char _Copyright_Notice[]; /* RTEMS copyright string */
SCORE_EXTERN rtems_cpu_table _CPU_Table; /* CPU dependent info */
/*
+ * Macros to access CPU Table fields required by ALL ports.
+ *
+ * NOTE: Similar macros to access port specific fields in in the
+ * appropriate cpu.h file.
+ */
+
+#define rtems_cpu_configuration_get_table() \
+ (&_CPU_Table)
+
+#define rtems_cpu_configuration_get_pretasking_hook() \
+ (_CPU_Table.pretasking_hook)
+
+#define rtems_cpu_configuration_get_predriver_hook() \
+ (_CPU_Table.predriver_hook)
+
+#define rtems_cpu_configuration_get_postdriver_hook() \
+ (_CPU_Table.postdriver_hook)
+
+#define rtems_cpu_configuration_get_idle_task() \
+ (_CPU_Table.idle_task)
+
+#define rtems_cpu_configuration_get_do_zero_of_workspace() \
+ (_CPU_Table.do_zero_of_workspace)
+
+#define rtems_cpu_configuration_get_idle_task_stack_size() \
+ (_CPU_Table.idle_task_stack_size)
+
+#define rtems_cpu_configuration_get_interrupt_stack_size() \
+ (_CPU_Table.interrupt_stack_size)
+
+#define rtems_cpu_configuration_get_extra_mpci_receive_server_stack() \
+ (_CPU_Table.extra_mpci_receive_server_stack)
+
+#define rtems_cpu_configuration_get_stack_allocate_hook() \
+ (_CPU_Table.stack_allocate_hook)
+
+#define rtems_cpu_configuration_get_stack_free_hook() \
+ (_CPU_Table.stack_free_hook)
+
+/*
* XXX weird RTEMS stuff
*/