From aac75d3b9bb7bf1b7ec10cfc3c20f58f1ab2240b Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 15 Dec 2008 19:21:01 +0000 Subject: 2008-12-15 Joel Sherrill * itron/include/rtems/itron/itronapi.h, libmisc/capture/capture.c, libmisc/monitor/mon-config.c, libmisc/monitor/mon-driver.c, libmisc/monitor/mon-itask.c, libmisc/monitor/mon-mpci.c, posix/include/rtems/posix/config.h, posix/include/rtems/posix/posixapi.h, rtems/include/rtems/rtems/config.h, rtems/include/rtems/rtems/rtemsapi.h, rtems/src/taskinitusers.c, sapi/include/confdefs.h, sapi/include/rtems/config.h, sapi/include/rtems/init.h, sapi/src/exinit.c, sapi/src/itronapi.c, sapi/src/posixapi.c, sapi/src/rtemsapi.c, score/src/isr.c, score/src/thread.c, score/src/threadcreateidle.c, score/src/threadstackallocate.c, score/src/threadstackfree.c, score/src/wkspace.c: Eliminate pointers to API configuration tables in the main configuration table. Reference the main configuration table and the API configuration tables directly using the confdefs.h version rather than obtaining a pointer to it. This eliminated some variables, a potential fatal error, some unnecessary default configuration structures. Overall, about a 4.5% reduction in the code size for minimum and hello on the SPARC. --- cpukit/score/src/isr.c | 8 ++++---- cpukit/score/src/thread.c | 6 +++--- cpukit/score/src/threadcreateidle.c | 4 ++-- cpukit/score/src/threadstackallocate.c | 6 +++--- cpukit/score/src/threadstackfree.c | 6 +++--- cpukit/score/src/wkspace.c | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) (limited to 'cpukit/score/src') diff --git a/cpukit/score/src/isr.c b/cpukit/score/src/isr.c index e6d62a9366..8e1a551472 100644 --- a/cpukit/score/src/isr.c +++ b/cpukit/score/src/isr.c @@ -2,7 +2,7 @@ * ISR Handler * * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -48,7 +48,7 @@ void _ISR_Handler_initialization( void ) #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) - if ( !_Stack_Is_enough(_Configuration_Table->interrupt_stack_size) ) + if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, @@ -56,12 +56,12 @@ void _ISR_Handler_initialization( void ) ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( - _Configuration_Table->interrupt_stack_size + Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( _CPU_Interrupt_stack_low, - _Configuration_Table->interrupt_stack_size + Configuration.interrupt_stack_size ); #endif diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c index 31e1d31b86..ecc47f49b2 100644 --- a/cpukit/score/src/thread.c +++ b/cpukit/score/src/thread.c @@ -2,7 +2,7 @@ * Thread 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 @@ -59,8 +59,8 @@ void _Thread_Handler_initialization( * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ - if ( !( (!_Configuration_Table->stack_allocate_hook) - == (!_Configuration_Table->stack_free_hook) ) ) + if ( !( (!Configuration.stack_allocate_hook) + == (!Configuration.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 2643d7248c..9ee8810b12 100644 --- a/cpukit/score/src/threadcreateidle.c +++ b/cpukit/score/src/threadcreateidle.c @@ -60,7 +60,7 @@ void _Thread_Create_idle( void ) &_Thread_Internal_information, _Thread_Idle, NULL, /* allocate the stack */ - _Stack_Ensure_minimum( _Configuration_Table->idle_task_stack_size ), + _Stack_Ensure_minimum( Configuration.idle_task_stack_size ), CPU_IDLE_TASK_IS_FP, PRIORITY_MAXIMUM, TRUE, /* preemptable */ @@ -82,7 +82,7 @@ void _Thread_Create_idle( void ) _Thread_Start( _Thread_Idle, THREAD_START_NUMERIC, - _Configuration_Table->idle_task, + Configuration.idle_task, NULL, 0 ); diff --git a/cpukit/score/src/threadstackallocate.c b/cpukit/score/src/threadstackallocate.c index 86ae78c4cc..35c08ec1df 100644 --- a/cpukit/score/src/threadstackallocate.c +++ b/cpukit/score/src/threadstackallocate.c @@ -2,7 +2,7 @@ * Thread Handler * * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -57,8 +57,8 @@ size_t _Thread_Stack_Allocate( * routine can call the correct deallocation routine. */ - if ( _Configuration_Table->stack_allocate_hook ) { - stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); + if ( Configuration.stack_allocate_hook ) { + stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); } else { /* diff --git a/cpukit/score/src/threadstackfree.c b/cpukit/score/src/threadstackfree.c index ad23a57de2..ba376b8972 100644 --- a/cpukit/score/src/threadstackfree.c +++ b/cpukit/score/src/threadstackfree.c @@ -2,7 +2,7 @@ * Thread Handler * * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -54,8 +54,8 @@ void _Thread_Stack_Free( * routine properly matches the allocation of the stack. */ - if ( _Configuration_Table->stack_free_hook ) - (*_Configuration_Table->stack_free_hook)( + if ( Configuration.stack_free_hook ) + (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c index ebb71f3297..fe18d75e59 100644 --- a/cpukit/score/src/wkspace.c +++ b/cpukit/score/src/wkspace.c @@ -1,7 +1,7 @@ /* * Workspace 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 @@ -39,7 +39,7 @@ void _Workspace_Handler_initialization( INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); - if ( _Configuration_Table->do_zero_of_workspace ) + if ( Configuration.do_zero_of_workspace ) memset( starting_address, 0, size ); memory_available = _Heap_Initialize( -- cgit v1.2.3