summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-12-15 19:22:36 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-12-15 19:22:36 +0000
commit71d0488b6c70f4fecaee7a9f978586d30c2c8064 (patch)
tree12a06d408c10986d4681d8e0d6bfc13a9795a664 /c
parent2008-12-15 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-71d0488b6c70f4fecaee7a9f978586d30c2c8064.tar.bz2
2008-12-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* bootcard.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 'c')
-rw-r--r--c/src/lib/libbsp/shared/ChangeLog10
-rw-r--r--c/src/lib/libbsp/shared/bootcard.c16
2 files changed, 18 insertions, 8 deletions
diff --git a/c/src/lib/libbsp/shared/ChangeLog b/c/src/lib/libbsp/shared/ChangeLog
index 5bd753b972..98ed522e66 100644
--- a/c/src/lib/libbsp/shared/ChangeLog
+++ b/c/src/lib/libbsp/shared/ChangeLog
@@ -1,3 +1,13 @@
+2008-12-15 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * bootcard.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.
+
2008-12-11 Ralf Corsepius <ralf.corsepius@rtems.org>
* clock_driver_stub.c: Remove (unused).
diff --git a/c/src/lib/libbsp/shared/bootcard.c b/c/src/lib/libbsp/shared/bootcard.c
index 58b1fb8aa5..a18eb7014a 100644
--- a/c/src/lib/libbsp/shared/bootcard.c
+++ b/c/src/lib/libbsp/shared/bootcard.c
@@ -64,12 +64,12 @@ extern bool rtems_unified_work_area;
*/
static rtems_status_code bootcard_bsp_libc_helper(
void *work_area_start,
- ssize_t work_area_size,
+ intptr_t work_area_size,
void *heap_start,
- ssize_t heap_size
+ intptr_t heap_size
)
{
- ssize_t heap_size_default = 0;
+ intptr_t heap_size_default = 0;
if ( !rtems_unified_work_area &&
heap_start == BSP_BOOTCARD_HEAP_USES_WORK_AREA) {
@@ -86,11 +86,11 @@ static rtems_status_code bootcard_bsp_libc_helper(
* For the default heap size use the free space from the start of the
* work area up to the work space start as heap area.
*/
- heap_size_default = (ssize_t) ((char *) Configuration.work_space_start
+ heap_size_default = (intptr_t) ((char *) Configuration.work_space_start
- (char *) work_area_start);
/* Keep it as a multiple of 16 bytes */
- heap_size_default &= ~((ssize_t) 0xf);
+ heap_size_default &= ~((intptr_t) 0xf);
/* Use default heap size if requested */
if (heap_size == BSP_BOOTCARD_HEAP_SIZE_DEFAULT) {
@@ -127,9 +127,9 @@ int boot_card(
rtems_interrupt_level bsp_isr_level;
rtems_status_code sc = RTEMS_SUCCESSFUL;
void *work_area_start = NULL;
- ssize_t work_area_size = 0;
+ intptr_t work_area_size = 0;
void *heap_start = NULL;
- ssize_t heap_size = 0;
+ intptr_t heap_size = 0;
/*
* Special case for PowerPC: The interrupt disable mask is stored in SPRG0.
@@ -193,7 +193,7 @@ int boot_card(
/*
* Initialize RTEMS data structures
*/
- rtems_initialize_data_structures( &Configuration );
+ rtems_initialize_data_structures();
/*
* Initialize the C library for those BSPs using the shared