summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-04-14 20:54:26 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-04-14 20:54:26 +0000
commit3b89891244d64e1053e758b05df1877b93de9e41 (patch)
tree1252d1903357d7e3b5ceaebee2bce5fafa2ca126
parent7a75c323e4c67307ae0a45a3c9ce2e168f5d32a2 (diff)
downloadrtems-3b89891244d64e1053e758b05df1877b93de9e41.tar.bz2
Now accounts for region used by RTEMS malloc and extension used
by newlib.
-rw-r--r--c/src/exec/sapi/headers/confdefs.h20
-rw-r--r--c/src/exec/sapi/include/confdefs.h20
-rw-r--r--c/src/lib/libbsp/a29k/portsw/startup/bspstart.c22
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/i386/force386/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/i386/go32/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/i386/i386ex/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/bspstart.c10
-rw-r--r--c/src/lib/libbsp/i960/cvme961/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/m68k/efi332/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/m68k/idp/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/mips/p4000/startup/bspstart.c22
-rw-r--r--c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c22
-rw-r--r--c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c22
-rw-r--r--c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/powerpc/psim/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/sh/gensh1/startup/bspstart.c22
-rw-r--r--c/src/lib/libbsp/sparc/erc32/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/unix/posix/startup/bspstart.c14
-rw-r--r--cpukit/sapi/include/confdefs.h20
29 files changed, 48 insertions, 412 deletions
diff --git a/c/src/exec/sapi/headers/confdefs.h b/c/src/exec/sapi/headers/confdefs.h
index df926196f5..6b7363f530 100644
--- a/c/src/exec/sapi/headers/confdefs.h
+++ b/c/src/exec/sapi/headers/confdefs.h
@@ -31,6 +31,15 @@ extern posix_api_configuration_table Configuration_POSIX_API;
#endif
/*
+ * RTEMS C Library and Newlib support
+ *
+ * NOTE: This ends up defining these even when newlib is not used.
+ */
+
+#define CONFIGURE_NEWLIB_EXTENSION 1
+#define CONFIGURE_MALLOC_REGION 1
+
+/*
* Default User Initialization Task Table. This table guarantees that
* one user initialization table is defined.
*/
@@ -412,6 +421,7 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
#define CONFIGURE_MEMORY_FOR_MP 0
#endif
+
#ifndef CONFIGURE_MEMORY_OVERHEAD
#define CONFIGURE_MEMORY_OVERHEAD 0
#endif
@@ -428,10 +438,12 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \
CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
- CONFIGURE_MEMORY_FOR_REGIONS(CONFIGURE_MAXIMUM_REGIONS) + \
+ CONFIGURE_MEMORY_FOR_REGIONS( \
+ CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION ) + \
CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
- CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) + \
+ CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \
+ CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION ) + \
CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
CONFIGURE_MEMORY_FOR_MP + \
CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD + \
@@ -464,7 +476,7 @@ rtems_api_configuration_table Configuration_RTEMS_API = {
CONFIGURE_MAXIMUM_SEMAPHORES,
CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
CONFIGURE_MAXIMUM_PARTITIONS,
- CONFIGURE_MAXIMUM_REGIONS,
+ CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION,
CONFIGURE_MAXIMUM_PORTS,
CONFIGURE_MAXIMUM_PERIODS,
CONFIGURE_INIT_TASK_TABLE_SIZE,
@@ -488,7 +500,7 @@ posix_api_configuration_table Configuration_POSIX_API = {
rtems_configuration_table Configuration = {
CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
CONFIGURE_EXECUTIVE_RAM_SIZE,
- CONFIGURE_MAXIMUM_USER_EXTENSIONS,
+ CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION,
CONFIGURE_MICROSECONDS_PER_TICK,
CONFIGURE_TICKS_PER_TIMESLICE,
CONFIGURE_MAXIMUM_DEVICES,
diff --git a/c/src/exec/sapi/include/confdefs.h b/c/src/exec/sapi/include/confdefs.h
index df926196f5..6b7363f530 100644
--- a/c/src/exec/sapi/include/confdefs.h
+++ b/c/src/exec/sapi/include/confdefs.h
@@ -31,6 +31,15 @@ extern posix_api_configuration_table Configuration_POSIX_API;
#endif
/*
+ * RTEMS C Library and Newlib support
+ *
+ * NOTE: This ends up defining these even when newlib is not used.
+ */
+
+#define CONFIGURE_NEWLIB_EXTENSION 1
+#define CONFIGURE_MALLOC_REGION 1
+
+/*
* Default User Initialization Task Table. This table guarantees that
* one user initialization table is defined.
*/
@@ -412,6 +421,7 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
#define CONFIGURE_MEMORY_FOR_MP 0
#endif
+
#ifndef CONFIGURE_MEMORY_OVERHEAD
#define CONFIGURE_MEMORY_OVERHEAD 0
#endif
@@ -428,10 +438,12 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \
CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
- CONFIGURE_MEMORY_FOR_REGIONS(CONFIGURE_MAXIMUM_REGIONS) + \
+ CONFIGURE_MEMORY_FOR_REGIONS( \
+ CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION ) + \
CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
- CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) + \
+ CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \
+ CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION ) + \
CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
CONFIGURE_MEMORY_FOR_MP + \
CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD + \
@@ -464,7 +476,7 @@ rtems_api_configuration_table Configuration_RTEMS_API = {
CONFIGURE_MAXIMUM_SEMAPHORES,
CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
CONFIGURE_MAXIMUM_PARTITIONS,
- CONFIGURE_MAXIMUM_REGIONS,
+ CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION,
CONFIGURE_MAXIMUM_PORTS,
CONFIGURE_MAXIMUM_PERIODS,
CONFIGURE_INIT_TASK_TABLE_SIZE,
@@ -488,7 +500,7 @@ posix_api_configuration_table Configuration_POSIX_API = {
rtems_configuration_table Configuration = {
CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
CONFIGURE_EXECUTIVE_RAM_SIZE,
- CONFIGURE_MAXIMUM_USER_EXTENSIONS,
+ CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION,
CONFIGURE_MICROSECONDS_PER_TICK,
CONFIGURE_TICKS_PER_TIMESLICE,
CONFIGURE_MAXIMUM_DEVICES,
diff --git a/c/src/lib/libbsp/a29k/portsw/startup/bspstart.c b/c/src/lib/libbsp/a29k/portsw/startup/bspstart.c
index 1952a79ac7..8f16c87e53 100644
--- a/c/src/lib/libbsp/a29k/portsw/startup/bspstart.c
+++ b/c/src/lib/libbsp/a29k/portsw/startup/bspstart.c
@@ -169,28 +169,6 @@ int bsp_start(
BSP_Configuration = Configuration;
- /*
- * Add 1 region for the RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
#ifdef STACK_CHECKER_ON
/*
* Add 1 extension for stack checker
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c b/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c
index dbcbecd1d2..193a91b03b 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c
@@ -346,20 +346,6 @@ void bsp_start(void)
}
#endif
- /*
- * Add 1 region for RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
-#ifdef RTEMS_NEWLIB
- /*
- * Add 1 extension for newlib libc
- */
-
- BSP_Configuration.maximum_extensions++;
-#endif
-
#ifdef STACK_CHECKER_ON
/*
* Add 1 extension for stack checker
diff --git a/c/src/lib/libbsp/i386/force386/startup/bspstart.c b/c/src/lib/libbsp/i386/force386/startup/bspstart.c
index 9e6b151593..95e54e259d 100644
--- a/c/src/lib/libbsp/i386/force386/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/force386/startup/bspstart.c
@@ -157,20 +157,6 @@ void bsp_start( void )
RAM_END - BSP_Configuration.work_space_size;
/*
- * Add 1 region for Malloc in libc_low
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
* Add another extension if using the stack checker
*/
diff --git a/c/src/lib/libbsp/i386/go32/startup/bspstart.c b/c/src/lib/libbsp/i386/go32/startup/bspstart.c
index 3e1498b426..6232ea0a03 100644
--- a/c/src/lib/libbsp/i386/go32/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/go32/startup/bspstart.c
@@ -167,20 +167,6 @@ int main(
}
/*
- * Add 1 region for Malloc in libc_low
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
* Add another extension if using the stack checker
*/
diff --git a/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c b/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c
index 5022148c06..b908504516 100644
--- a/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c
@@ -165,12 +165,6 @@ void bsp_start( void )
RAM_END - BSP_Configuration.work_space_size;
/*
- * Add 1 region for Malloc in libc_low
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
* Account for the console's resources
*/
@@ -178,14 +172,6 @@ void bsp_start( void )
/*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
* Add another extension if using the stack checker
*/
diff --git a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
index b6035400db..8a663b5102 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
@@ -172,16 +172,6 @@ void bsp_start( void )
BSP_Configuration.work_space_start =
(void *)(RAM_END - BSP_Configuration.work_space_size);
- /* Add 1 region for Malloc in libc_low. */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /* Add 1 extension for newlib libc. */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
/* Add another extension if using the stack checker. */
#ifdef STACK_CHECKER_ON
diff --git a/c/src/lib/libbsp/i960/cvme961/startup/bspstart.c b/c/src/lib/libbsp/i960/cvme961/startup/bspstart.c
index 6393321d23..cafb9d3e64 100644
--- a/c/src/lib/libbsp/i960/cvme961/startup/bspstart.c
+++ b/c/src/lib/libbsp/i960/cvme961/startup/bspstart.c
@@ -172,20 +172,6 @@ void bsp_start( void )
BSP_Configuration = Configuration;
/*
- * Add 1 region for the RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
* Add another extension if using the stack checker
*/
diff --git a/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c b/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
index a63187cf78..2ae0703873 100644
--- a/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
@@ -180,26 +180,12 @@ void bsp_start( void )
(RAM_END - BSP_Configuration.work_space_size);
/*
- * Add 1 region for Malloc in libc_low
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
* Account for the console's resources
*/
console_reserve_resources( &BSP_Configuration );
/*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
* Add another extension if using the stack checker
*/
diff --git a/c/src/lib/libbsp/m68k/efi332/startup/bspstart.c b/c/src/lib/libbsp/m68k/efi332/startup/bspstart.c
index 6a2e6604eb..ad3afcd7f4 100644
--- a/c/src/lib/libbsp/m68k/efi332/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/efi332/startup/bspstart.c
@@ -158,20 +158,6 @@ void bsp_start( void )
(((unsigned int)_end + STACK_SIZE + 0x100) & 0xffffff00);
/*
- * Add 1 region for Malloc in libc_low
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
* Add another extension if using the stack checker
*/
diff --git a/c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c b/c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c
index 4c7431efb6..c1eb7b47b3 100644
--- a/c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c
@@ -167,20 +167,6 @@ void bsp_start( void )
(((unsigned int)_end + STACK_SIZE + 0x100) & 0xffffff00);
/*
- * Add 1 region for Malloc in libc_low
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
* Add another extension if using the stack checker
*/
diff --git a/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c b/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
index f301a99297..53dc90eb3b 100644
--- a/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
@@ -146,20 +146,6 @@ void bsp_start( void )
BSP_Configuration = Configuration;
/*
- * Add 1 region for the RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
* Add another extension if using the stack checker
*/
diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c b/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c
index 7c58cd9254..c9d7847a54 100644
--- a/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c
@@ -142,20 +142,6 @@ void bsp_start( void )
BSP_Configuration = Configuration;
/*
- * Add 1 region for the RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
* Add another extension if using the stack checker
*/
diff --git a/c/src/lib/libbsp/m68k/idp/startup/bspstart.c b/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
index bf66f8f6ba..fb34077c3a 100644
--- a/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
@@ -187,20 +187,6 @@ void bsp_start( void )
(RAM_END - BSP_Configuration.work_space_size);
/*
- * Add 1 region for the RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
* Add another extension if using the stack checker
*/
diff --git a/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c
index f551c78c2e..80fed12d14 100644
--- a/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c
@@ -168,20 +168,6 @@ void bsp_start( void )
(RAM_END - BSP_Configuration.work_space_size);
/*
- * Add 1 region for the RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
* Add another extension if using the stack checker
*/
diff --git a/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c
index d86155db99..280657c8ea 100644
--- a/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c
@@ -176,20 +176,6 @@ void bsp_start( void )
(RAM_END - BSP_Configuration.work_space_size);
/*
- * Add 1 region for the RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
* Add another extension if using the stack checker
*/
diff --git a/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c
index d50a63910a..42874bc84f 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c
@@ -236,20 +236,6 @@ void bsp_start( void )
(RAM_END - BSP_Configuration.work_space_size);
/*
- * Add 1 region for the RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
* Add another extension if using the stack checker
*/
diff --git a/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c
index 5ed4265c44..dfc969a0a4 100644
--- a/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c
@@ -191,20 +191,6 @@ void bsp_start( void )
BSP_Configuration = Configuration;
/*
- * Add 1 region for the RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
* Add another extension if using the stack checker
*/
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c b/c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c
index 2448109128..721aa58c82 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c
@@ -145,20 +145,6 @@ void bsp_start( void )
BSP_Configuration = Configuration;
/*
- * Add 1 region for the RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
* Add another extension if using the stack checker
*/
diff --git a/c/src/lib/libbsp/mips/p4000/startup/bspstart.c b/c/src/lib/libbsp/mips/p4000/startup/bspstart.c
index 7184d9f931..6d97ec7528 100644
--- a/c/src/lib/libbsp/mips/p4000/startup/bspstart.c
+++ b/c/src/lib/libbsp/mips/p4000/startup/bspstart.c
@@ -151,28 +151,6 @@ void bsp_start( void )
BSP_Configuration = Configuration;
- /*
- * Add 1 region for the RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
#ifdef STACK_CHECKER_ON
/*
* Add 1 extension for stack checker
diff --git a/c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c b/c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c
index 7184d9f931..6d97ec7528 100644
--- a/c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c
+++ b/c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c
@@ -151,28 +151,6 @@ void bsp_start( void )
BSP_Configuration = Configuration;
- /*
- * Add 1 region for the RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
#ifdef STACK_CHECKER_ON
/*
* Add 1 extension for stack checker
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c b/c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c
index c03382bed2..ed6db0f908 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c
@@ -149,28 +149,6 @@ int bsp_start(
BSP_Configuration = Configuration;
- /*
- * Add 1 region for the RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
#ifdef STACK_CHECKER_ON
/*
* Add 1 extension for stack checker
diff --git a/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c b/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c
index 5d0c4a64f2..15941b1433 100644
--- a/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c
@@ -160,20 +160,6 @@ void bsp_start( void )
BSP_Configuration = Configuration;
/*
- * Add 1 region for the RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
* Add 1 extension for stack checker
*/
diff --git a/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c b/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c
index 91bdae7fba..9262d95461 100644
--- a/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c
@@ -293,20 +293,6 @@ void bsp_start( void )
BSP_Configuration.work_space_start = work_space_start;
- /*
- * Add 1 region for RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
-#ifdef RTEMS_NEWLIB
- /*
- * Add 1 extension for newlib libc
- */
-
- BSP_Configuration.maximum_extensions++;
-#endif
-
#ifdef STACK_CHECKER_ON
/*
* Add 1 extension for stack checker
diff --git a/c/src/lib/libbsp/sh/gensh1/startup/bspstart.c b/c/src/lib/libbsp/sh/gensh1/startup/bspstart.c
index 585e572aa3..51fb274b83 100644
--- a/c/src/lib/libbsp/sh/gensh1/startup/bspstart.c
+++ b/c/src/lib/libbsp/sh/gensh1/startup/bspstart.c
@@ -151,28 +151,6 @@ void bsp_start(void)
BSP_Configuration = Configuration;
- /*
- * Add 1 region for the RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
#ifdef STACK_CHECKER_ON
/*
* Add 1 extension for stack checker
diff --git a/c/src/lib/libbsp/sparc/erc32/startup/bspstart.c b/c/src/lib/libbsp/sparc/erc32/startup/bspstart.c
index e05b6037f8..a7c343d47b 100644
--- a/c/src/lib/libbsp/sparc/erc32/startup/bspstart.c
+++ b/c/src/lib/libbsp/sparc/erc32/startup/bspstart.c
@@ -293,25 +293,11 @@ void bsp_start( void )
BSP_Configuration.work_space_start = work_space_start;
/*
- * Add 1 region for RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
* Account for the console's resources
*/
console_reserve_resources( &BSP_Configuration );
-#ifdef RTEMS_NEWLIB
- /*
- * Add 1 extension for newlib libc
- */
-
- BSP_Configuration.maximum_extensions++;
-#endif
-
#ifdef STACK_CHECKER_ON
/*
* Add 1 extension for stack checker
diff --git a/c/src/lib/libbsp/unix/posix/startup/bspstart.c b/c/src/lib/libbsp/unix/posix/startup/bspstart.c
index be3f9373fb..85a0b3ddde 100644
--- a/c/src/lib/libbsp/unix/posix/startup/bspstart.c
+++ b/c/src/lib/libbsp/unix/posix/startup/bspstart.c
@@ -302,20 +302,6 @@ bsp_start(void)
Cpu_table.extra_mpci_receive_server_stack = 0;
- /*
- * Add 1 region for RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
-#ifdef RTEMS_NEWLIB
- /*
- * Add 1 extension for newlib libc
- */
-
- BSP_Configuration.maximum_extensions++;
-#endif
-
#ifdef STACK_CHECKER_ON
/*
* Add 1 extension for stack checker
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index df926196f5..6b7363f530 100644
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -31,6 +31,15 @@ extern posix_api_configuration_table Configuration_POSIX_API;
#endif
/*
+ * RTEMS C Library and Newlib support
+ *
+ * NOTE: This ends up defining these even when newlib is not used.
+ */
+
+#define CONFIGURE_NEWLIB_EXTENSION 1
+#define CONFIGURE_MALLOC_REGION 1
+
+/*
* Default User Initialization Task Table. This table guarantees that
* one user initialization table is defined.
*/
@@ -412,6 +421,7 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
#define CONFIGURE_MEMORY_FOR_MP 0
#endif
+
#ifndef CONFIGURE_MEMORY_OVERHEAD
#define CONFIGURE_MEMORY_OVERHEAD 0
#endif
@@ -428,10 +438,12 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \
CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
- CONFIGURE_MEMORY_FOR_REGIONS(CONFIGURE_MAXIMUM_REGIONS) + \
+ CONFIGURE_MEMORY_FOR_REGIONS( \
+ CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION ) + \
CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
- CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) + \
+ CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \
+ CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION ) + \
CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
CONFIGURE_MEMORY_FOR_MP + \
CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD + \
@@ -464,7 +476,7 @@ rtems_api_configuration_table Configuration_RTEMS_API = {
CONFIGURE_MAXIMUM_SEMAPHORES,
CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
CONFIGURE_MAXIMUM_PARTITIONS,
- CONFIGURE_MAXIMUM_REGIONS,
+ CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION,
CONFIGURE_MAXIMUM_PORTS,
CONFIGURE_MAXIMUM_PERIODS,
CONFIGURE_INIT_TASK_TABLE_SIZE,
@@ -488,7 +500,7 @@ posix_api_configuration_table Configuration_POSIX_API = {
rtems_configuration_table Configuration = {
CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
CONFIGURE_EXECUTIVE_RAM_SIZE,
- CONFIGURE_MAXIMUM_USER_EXTENSIONS,
+ CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION,
CONFIGURE_MICROSECONDS_PER_TICK,
CONFIGURE_TICKS_PER_TIMESLICE,
CONFIGURE_MAXIMUM_DEVICES,