summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-12-17 22:46:05 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-12-17 22:46:05 +0000
commit790b50b8da754eba39e2c21d67bb9b14df966080 (patch)
tree7f8386fb4eb796d8dc60e421e07f9059278012d2 /cpukit/score/src
parent2008-12-17 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-790b50b8da754eba39e2c21d67bb9b14df966080.tar.bz2
2008-12-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* sapi/include/rtems/extension.h, sapi/include/rtems/io.h, sapi/src/exinit.c, sapi/src/extension.c, sapi/src/io.c, score/include/rtems/score/mpci.h, score/include/rtems/score/object.h, score/include/rtems/score/thread.h, score/include/rtems/score/tod.h, score/include/rtems/score/userext.h, score/include/rtems/score/wkspace.h, score/src/coretod.c, score/src/mpci.c, score/src/object.c, score/src/thread.c, score/src/userext.c, score/src/wkspace.c: Convert SAPI manager and SuperCore Handler initialization routines to directly pull parameters from configuration table.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r--cpukit/score/src/coretod.c9
-rw-r--r--cpukit/score/src/mpci.c11
-rw-r--r--cpukit/score/src/object.c23
-rw-r--r--cpukit/score/src/thread.c26
-rw-r--r--cpukit/score/src/userext.c13
-rw-r--r--cpukit/score/src/wkspace.c11
6 files changed, 50 insertions, 43 deletions
diff --git a/cpukit/score/src/coretod.c b/cpukit/score/src/coretod.c
index 6d0fc11b5a..f672c43455 100644
--- a/cpukit/score/src/coretod.c
+++ b/cpukit/score/src/coretod.c
@@ -2,7 +2,7 @@
* Time of Day (TOD) Handler
*/
-/* COPYRIGHT (c) 1989-2007.
+/* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -28,15 +28,12 @@
*
* This routine initializes the time of day handler.
*
- * Input parameters:
- * microseconds_per_tick - microseconds between clock ticks
+ * Input parameters: NONE
*
* Output parameters: NONE
*/
-void _TOD_Handler_initialization(
- uint32_t microseconds_per_tick
-)
+void _TOD_Handler_initialization(void)
{
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, TOD_SECONDS_1970_THROUGH_1988, 0 );
diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c
index 9cd7866c66..30dd3baaa5 100644
--- a/cpukit/score/src/mpci.c
+++ b/cpukit/score/src/mpci.c
@@ -2,7 +2,7 @@
* Multiprocessing Communications Interface (MPCI) Handler
*
*
- * COPYRIGHT (c) 1989-2007.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -21,6 +21,7 @@
#include <rtems/score/mpci.h>
#include <rtems/score/mppkt.h>
#endif
+#include <rtems/config.h>
#include <rtems/score/cpu.h>
#include <rtems/score/interr.h>
#include <rtems/score/states.h>
@@ -46,11 +47,13 @@ CORE_semaphore_Control _MPCI_Semaphore;
*/
void _MPCI_Handler_initialization(
- MPCI_Control *users_mpci_table,
- uint32_t timeout_status
+ uint32_t timeout_status
)
{
- CORE_semaphore_Attributes attributes;
+ CORE_semaphore_Attributes attributes;
+ MPCI_Control *users_mpci_table;
+
+ users_mpci_table = _Configuration_MP_table->User_mpci_table;
if ( _System_state_Is_multiprocessing && !users_mpci_table )
_Internal_error_Occurred(
diff --git a/cpukit/score/src/object.c b/cpukit/score/src/object.c
index 9be6f89c95..f34739aa67 100644
--- a/cpukit/score/src/object.c
+++ b/cpukit/score/src/object.c
@@ -2,7 +2,7 @@
* Object Handler
*
*
- * COPYRIGHT (c) 1989-2007.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -17,6 +17,7 @@
#endif
#include <rtems/system.h>
+#include <rtems/config.h>
#include <rtems/score/address.h>
#include <rtems/score/chain.h>
#include <rtems/score/object.h>
@@ -34,24 +35,22 @@
*
* This routine initializes the object handler.
*
- * Input parameters:
- * node - local node
- * maximum_nodes - number of nodes in the system
- * maximum_global_objects - number of configured global objects
+ * Input parameters: NONE
*
* Output parameters: NONE
*/
-#if defined(RTEMS_MULTIPROCESSING)
-void _Objects_Handler_initialization(
- uint32_t node,
- uint32_t maximum_nodes,
- uint32_t maximum_global_objects )
-#else
void _Objects_Handler_initialization(void)
-#endif
{
#if defined(RTEMS_MULTIPROCESSING)
+ uint32_t node;
+ uint32_t maximum_nodes;
+ uint32_t maximum_global_objects;
+
+ node = _Configuration_MP_table->node;
+ maximum_nodes = _Configuration_MP_table->maximum_nodes;
+ maximum_global_objects = _Configuration_MP_table->maximum_global_objects;
+
if ( node < 1 || node > maximum_nodes )
_Internal_error_Occurred(
INTERNAL_ERROR_CORE,
diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c
index ecc47f49b2..a6774388e0 100644
--- a/cpukit/score/src/thread.c
+++ b/cpukit/score/src/thread.c
@@ -17,6 +17,7 @@
#endif
#include <rtems/system.h>
+#include <rtems/config.h>
#include <rtems/score/apiext.h>
#include <rtems/score/context.h>
#include <rtems/score/interr.h>
@@ -37,24 +38,25 @@
*
* This routine initializes all thread manager related data structures.
*
- * Input parameters:
- * ticks_per_timeslice - clock ticks per quantum
- * maximum_proxies - number of proxies to initialize
+ * Input parameters: NONE
*
* Output parameters: NONE
*/
-void _Thread_Handler_initialization(
- uint32_t ticks_per_timeslice,
- uint32_t maximum_extensions
-#if defined(RTEMS_MULTIPROCESSING)
- ,
- uint32_t maximum_proxies
-#endif
-)
+void _Thread_Handler_initialization(void)
{
- uint32_t index;
+ uint32_t index;
+ uint32_t ticks_per_timeslice;
+ uint32_t maximum_extensions;
+ #if defined(RTEMS_MULTIPROCESSING)
+ uint32_t maximum_proxies;
+ #endif
+ ticks_per_timeslice = Configuration.ticks_per_timeslice;
+ maximum_extensions = Configuration.maximum_extensions;
+ #if defined(RTEMS_MULTIPROCESSING)
+ maximum_proxies = _Configuration_MP_table->maximum_proxies;
+ #endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
diff --git a/cpukit/score/src/userext.c b/cpukit/score/src/userext.c
index c23e63f40d..190c15f85f 100644
--- a/cpukit/score/src/userext.c
+++ b/cpukit/score/src/userext.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2007.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -14,6 +14,7 @@
#endif
#include <rtems/system.h>
+#include <rtems/config.h>
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
@@ -22,13 +23,15 @@
* This routine performs the initialization necessary for this handler.
*/
-void _User_extensions_Handler_initialization (
- uint32_t number_of_extensions,
- User_extensions_Table *initial_extensions
-)
+void _User_extensions_Handler_initialization(void)
{
User_extensions_Control *extension;
uint32_t i;
+ uint32_t number_of_extensions;
+ User_extensions_Table *initial_extensions;
+
+ number_of_extensions = Configuration.number_of_initial_extensions;
+ initial_extensions = Configuration.User_extension_table;
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c
index fe18d75e59..181be3bcb5 100644
--- a/cpukit/score/src/wkspace.c
+++ b/cpukit/score/src/wkspace.c
@@ -16,6 +16,7 @@
#endif
#include <rtems/system.h>
+#include <rtems/config.h>
#include <rtems/score/wkspace.h>
#include <rtems/score/interr.h>
#include <rtems/config.h>
@@ -25,12 +26,14 @@
/*
* _Workspace_Handler_initialization
*/
-void _Workspace_Handler_initialization(
- void *starting_address,
- size_t size
-)
+void _Workspace_Handler_initialization(void)
{
uint32_t memory_available;
+ void *starting_address;
+ size_t size;
+
+ starting_address = Configuration.work_space_start;
+ size = Configuration.work_space_size;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
_Internal_error_Occurred(