summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-03 22:23:13 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-03 22:23:13 +0000
commit976162a69f6fdfbd2ab507074be7d99a48b4f7f7 (patch)
tree375dac0660e6845642167a2cba304a6812a33d26 /cpukit/score/src
parent2007-12-03 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-976162a69f6fdfbd2ab507074be7d99a48b4f7f7.tar.bz2
2007-12-03 Joel Sherrill <joel.sherrill@OARcorp.com>
* libcsupport/src/malloc.c, libmisc/monitor/mon-command.c, posix/preinstall.am, posix/include/rtems/posix/cond.h, posix/include/rtems/posix/mqueue.h, posix/include/rtems/posix/mutex.h, posix/include/rtems/posix/pthread.h, posix/include/rtems/posix/semaphore.h, posix/src/conddestroy.c, posix/src/mutexdestroy.c, posix/src/mutexinit.c, posix/src/mutexsetprioceiling.c, posix/src/mutexunlock.c, sapi/include/confdefs.h, sapi/include/rtems/config.h, sapi/include/rtems/init.h, sapi/include/rtems/sptables.h, sapi/src/exinit.c, score/include/rtems/system.h, score/include/rtems/score/mpci.h, score/src/mpci.c, score/src/thread.c, score/src/threadcreateidle.c, score/src/threadstackallocate.c, score/src/threadstackfree.c, score/src/wkspace.c: Moved most of the remaining CPU Table fields to the Configuration Table. This included pretasking_hook, predriver_hook, postdriver_hook, idle_task, do_zero_of_workspace, extra_mpci_receive_server_stack, stack_allocate_hook, and stack_free_hook. As a side-effect of this effort some multiprocessing code was made conditional and some style clean up occurred.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r--cpukit/score/src/mpci.c9
-rw-r--r--cpukit/score/src/thread.c6
-rw-r--r--cpukit/score/src/threadcreateidle.c7
-rw-r--r--cpukit/score/src/threadstackallocate.c5
-rw-r--r--cpukit/score/src/threadstackfree.c7
-rw-r--r--cpukit/score/src/wkspace.c19
6 files changed, 27 insertions, 26 deletions
diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c
index c6cddd86b8..17eb37625f 100644
--- a/cpukit/score/src/mpci.c
+++ b/cpukit/score/src/mpci.c
@@ -17,12 +17,12 @@
#endif
#include <rtems/system.h>
-#include <rtems/score/cpu.h>
-#include <rtems/score/interr.h>
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#include <rtems/score/mppkt.h>
#endif
+#include <rtems/score/cpu.h>
+#include <rtems/score/interr.h>
#include <rtems/score/states.h>
#include <rtems/score/thread.h>
#include <rtems/score/threadq.h>
@@ -31,6 +31,7 @@
#include <rtems/score/sysstate.h>
#include <rtems/score/coresem.h>
+#include <rtems/config.h>
/*PAGE
*
@@ -112,7 +113,9 @@ void _MPCI_Create_server( void )
&_Thread_Internal_information,
_MPCI_Receive_server_tcb,
NULL, /* allocate the stack */
- MPCI_RECEIVE_SERVER_STACK_SIZE,
+ STACK_MINIMUM_SIZE +
+ CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK +
+ _Configuration_MP_table->extra_mpci_receive_server_stack,
CPU_ALL_TASKS_ARE_FP,
PRIORITY_MINIMUM,
FALSE, /* no preempt */
diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c
index 8e924c65cf..a8032598d2 100644
--- a/cpukit/score/src/thread.c
+++ b/cpukit/score/src/thread.c
@@ -29,6 +29,7 @@
#include <rtems/score/threadq.h>
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
+#include <rtems/config.h>
/*PAGE
*
@@ -58,9 +59,8 @@ void _Thread_Handler_initialization(
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
-
- if ( !( ( _CPU_Table.stack_allocate_hook == 0 )
- == ( _CPU_Table.stack_free_hook == 0 ) ) )
+ if ( !( (!_Configuration_Table->stack_allocate_hook)
+ == (!_Configuration_Table->stack_free_hook) ) )
_Internal_error_Occurred(
INTERNAL_ERROR_CORE,
TRUE,
diff --git a/cpukit/score/src/threadcreateidle.c b/cpukit/score/src/threadcreateidle.c
index f9d4d21ba9..602fc7840b 100644
--- a/cpukit/score/src/threadcreateidle.c
+++ b/cpukit/score/src/threadcreateidle.c
@@ -29,6 +29,7 @@
#include <rtems/score/threadq.h>
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
+#include <rtems/config.h>
/*PAGE
*
@@ -60,10 +61,10 @@ void _Thread_Create_idle( void )
idle = (void *) _Thread_Idle_body;
#endif
- if ( _CPU_Table.idle_task )
- idle = _CPU_Table.idle_task;
+ if ( _Configuration_Table->idle_task )
+ idle = _Configuration_Table->idle_task;
- idle_task_stack_size = _CPU_Table.idle_task_stack_size;
+ idle_task_stack_size = _Configuration_Table->idle_task_stack_size;
if ( idle_task_stack_size < STACK_MINIMUM_SIZE )
idle_task_stack_size = STACK_MINIMUM_SIZE;
diff --git a/cpukit/score/src/threadstackallocate.c b/cpukit/score/src/threadstackallocate.c
index 9cc4da54f8..b0b131bfc8 100644
--- a/cpukit/score/src/threadstackallocate.c
+++ b/cpukit/score/src/threadstackallocate.c
@@ -29,6 +29,7 @@
#include <rtems/score/threadq.h>
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
+#include <rtems/config.h>
/*PAGE
*
@@ -57,8 +58,8 @@ size_t _Thread_Stack_Allocate(
* routine can call the correct deallocation routine.
*/
- if ( _CPU_Table.stack_allocate_hook ) {
- stack_addr = (*_CPU_Table.stack_allocate_hook)( the_stack_size );
+ if ( _Configuration_Table->stack_allocate_hook ) {
+ stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size );
} else {
/*
diff --git a/cpukit/score/src/threadstackfree.c b/cpukit/score/src/threadstackfree.c
index 305b1eafba..ad23a57de2 100644
--- a/cpukit/score/src/threadstackfree.c
+++ b/cpukit/score/src/threadstackfree.c
@@ -29,6 +29,7 @@
#include <rtems/score/threadq.h>
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
+#include <rtems/config.h>
/*
* _Thread_Stack_Free
@@ -53,8 +54,10 @@ void _Thread_Stack_Free(
* routine properly matches the allocation of the stack.
*/
- if ( _CPU_Table.stack_free_hook )
- (*_CPU_Table.stack_free_hook)( the_thread->Start.Initial_stack.area );
+ if ( _Configuration_Table->stack_free_hook )
+ (*_Configuration_Table->stack_free_hook)(
+ the_thread->Start.Initial_stack.area
+ );
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c
index c5cd84abf7..953981c477 100644
--- a/cpukit/score/src/wkspace.c
+++ b/cpukit/score/src/wkspace.c
@@ -1,11 +1,7 @@
/*
* Workspace Handler
*
- * XXX
- *
- * NOTE:
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -22,6 +18,9 @@
#include <rtems/system.h>
#include <rtems/score/wkspace.h>
#include <rtems/score/interr.h>
+#include <rtems/config.h>
+
+#include <string.h> /* for memset */
/*PAGE
*
@@ -33,8 +32,6 @@ void _Workspace_Handler_initialization(
size_t size
)
{
- uint32_t *zero_out_array;
- uint32_t index;
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
@@ -44,12 +41,8 @@ void _Workspace_Handler_initialization(
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
);
- if ( _CPU_Table.do_zero_of_workspace ) {
- for( zero_out_array = (uint32_t *) starting_address, index = 0 ;
- index < size / sizeof( uint32_t ) ;
- index++ )
- zero_out_array[ index ] = 0;
- }
+ if ( _Configuration_Table->do_zero_of_workspace )
+ memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
&_Workspace_Area,