diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-12-15 19:21:01 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-12-15 19:21:01 +0000 |
commit | aac75d3b9bb7bf1b7ec10cfc3c20f58f1ab2240b (patch) | |
tree | abdcbbf04573f71bc24897dfb3ee5d14a8be9a1e /cpukit/sapi/include/rtems/config.h | |
parent | 2008-12-15 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-aac75d3b9bb7bf1b7ec10cfc3c20f58f1ab2240b.tar.bz2 |
2008-12-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* 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.
Diffstat (limited to 'cpukit/sapi/include/rtems/config.h')
-rw-r--r-- | cpukit/sapi/include/rtems/config.h | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/cpukit/sapi/include/rtems/config.h b/cpukit/sapi/include/rtems/config.h index d0af0172d9..ad3f923965 100644 --- a/cpukit/sapi/include/rtems/config.h +++ b/cpukit/sapi/include/rtems/config.h @@ -170,21 +170,20 @@ typedef struct { rtems_driver_address_table *Device_driver_table; uint32_t number_of_initial_extensions; rtems_extensions_table *User_extension_table; -#if defined(RTEMS_MULTIPROCESSING) - rtems_multiprocessing_table *User_multiprocessing_table; -#endif - rtems_api_configuration_table *RTEMS_api_configuration; - posix_api_configuration_table *POSIX_api_configuration; - itron_api_configuration_table *ITRON_api_configuration; + #if defined(RTEMS_MULTIPROCESSING) + rtems_multiprocessing_table *User_multiprocessing_table; + #endif } rtems_configuration_table; -/* - * The following are provided strictly for the convenience of - * the user. They are not used in RTEMS itself. +/** + * This is the configuration table generated by confdefs.h. */ +extern rtems_configuration_table Configuration; -SAPI_EXTERN rtems_configuration_table *_Configuration_Table; #if defined(RTEMS_MULTIPROCESSING) + /** + * This points to the multiprocessing configuration table. + */ SAPI_EXTERN rtems_multiprocessing_table *_Configuration_MP_table; #endif @@ -194,7 +193,7 @@ SAPI_EXTERN rtems_configuration_table *_Configuration_Table; */ #define rtems_configuration_get_table() \ - (&_Configuration_Table) + (&Configuration) #define rtems_configuration_get_work_space_start() \ (Configuration.work_space_start) @@ -203,21 +202,21 @@ SAPI_EXTERN rtems_configuration_table *_Configuration_Table; (Configuration.work_space_size) #define rtems_configuration_get_maximum_extensions() \ - (_Configuration_Table->maximum_extensions) + (Configuration.maximum_extensions) #define rtems_configuration_get_microseconds_per_tick() \ - (_Configuration_Table->microseconds_per_tick) + (Configuration.microseconds_per_tick) #define rtems_configuration_get_milliseconds_per_tick() \ - (_Configuration_Table->microseconds_per_tick / 1000) + (Configuration.microseconds_per_tick / 1000) #define rtems_configuration_get_ticks_per_timeslice() \ - (_Configuration_Table->ticks_per_timeslice) + (Configuration.ticks_per_timeslice) #define rtems_configuration_get_idle_task() \ - (_Configuration_Table->idle_task) + (Configuration.idle_task) #define rtems_configuration_get_idle_task_stack_size() \ - (_Configuration_Table->idle_task_stack_size) + (Configuration.idle_task_stack_size) /* XXX We need to get this from the generated table * since BSPs need it before the pointer is set. @@ -229,45 +228,45 @@ extern rtems_configuration_table Configuration; (Configuration.interrupt_stack_size) #define rtems_configuration_get_stack_allocate_hook() \ - (_Configuration_Table->stack_allocate_hook) + (Configuration.stack_allocate_hook) #define rtems_configuration_get_stack_free_hook() \ - (_Configuration_Table->stack_free_hook) + (Configuration.stack_free_hook) /** * This macro assists in accessing the field which indicates whether * RTEMS is responsible for zeroing the Executive Workspace. */ #define rtems_configuration_get_do_zero_of_workspace() \ - (_Configuration_Table->do_zero_of_workspace) + (Configuration.do_zero_of_workspace) #define rtems_configuration_get_number_of_device_drivers() \ - (_Configuration_Table->number_of_device_drivers) + (Configuration.number_of_device_drivers) #define rtems_configuration_get_device_driver_table() \ - (_Configuration_Table->device_driver_table) + (Configuration.device_driver_table) #define rtems_configuration_get_number_of_initial_extensions() \ - (_Configuration_Table->number_of_initial_extensions) + (Configuration.number_of_initial_extensions) #define rtems_configuration_get_user_extension_table() \ - (_Configuration_Table->user_extension_table) + (Configuration.user_extension_table) #if defined(RTEMS_MULTIPROCESSING) #define rtems_configuration_get_user_multiprocessing_table() \ - (_Configuration_Table->User_multiprocessing_table) + (Configuration.User_multiprocessing_table) #else #define rtems_configuration_get_user_multiprocessing_table() NULL #endif #define rtems_configuration_get_rtems_api_configuration() \ - (_Configuration_Table->RTEMS_api_configuration) + (&Configuration_RTEMS_API) #define rtems_configuration_get_posix_api_configuration() \ - (_Configuration_Table->POSIX_api_configuration) + (&Configuration_POSIX_API) #define rtems_configuration_get_itron_api_configuration() \ - (_Configuration_Table->ITRON_api_configuration) + (&Configuration_ITRON_API) #ifdef __cplusplus } |