From 2eba45de912fcc341e9635875f5b2475e9f4ac93 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 28 May 1996 14:16:45 +0000 Subject: made posix configuration information conditional so configurations wanting only the rtems api don't have to include it. --- c/src/exec/sapi/headers/confdefs.h | 39 +++++++++++++++++++++++++++++++++- c/src/exec/sapi/headers/config.h | 11 ++++++++++ c/src/exec/sapi/include/confdefs.h | 39 +++++++++++++++++++++++++++++++++- c/src/exec/sapi/include/rtems/config.h | 11 ++++++++++ 4 files changed, 98 insertions(+), 2 deletions(-) (limited to 'c') diff --git a/c/src/exec/sapi/headers/confdefs.h b/c/src/exec/sapi/headers/confdefs.h index 8450e43c3c..ea6b837cac 100644 --- a/c/src/exec/sapi/headers/confdefs.h +++ b/c/src/exec/sapi/headers/confdefs.h @@ -26,6 +26,9 @@ extern rtems_initialization_tasks_table Initialization_tasks[]; extern rtems_driver_address_table Device_drivers[]; extern rtems_configuration_table Configuration; extern rtems_multiprocessing_table Multiprocessing_configuration; +#ifdef RTEMS_POSIX_API +extern posix_api_configuration_table Configuration_POSIX_API; +#endif /* * Default User Initialization Task Table. This table guarantees that @@ -235,6 +238,26 @@ rtems_multiprocessing_table Multiprocessing_configuration = { #define CONFIGURE_INITIAL_EXTENSIONS NULL #endif +/* + * POSIX API Configuration Parameters + */ + +#ifdef RTEMS_POSIX_API + +#ifndef CONFIGURE_MAXIMUM_POSIX_THREADS +#define CONFIGURE_MAXIMUM_POSIX_THREADS 10 +#endif + +#ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES +#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 0 +#endif + +#ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES +#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 0 +#endif + +#endif + /* * Calculate the RAM size based on the maximum number of objects configured. * The model is to estimate the memory required for each configured item, @@ -355,6 +378,16 @@ rtems_api_configuration_table Configuration_RTEMS_API = { Initialization_tasks /* init task(s) table */ }; +#ifdef RTEMS_POSIX_API +posix_api_configuration_table Configuration_POSIX_API = { + CONFIGURE_MAXIMUM_POSIX_THREADS, + CONFIGURE_MAXIMUM_POSIX_MUTEXES, + CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES, + 0, + NULL +}; +#endif + rtems_configuration_table Configuration = { CONFIGURE_EXECUTIVE_RAM_WORK_AREA, CONFIGURE_EXECUTIVE_RAM_SIZE, @@ -368,7 +401,11 @@ rtems_configuration_table Configuration = { CONFIGURE_INITIAL_EXTENSIONS, /* pointer to initial extensions */ CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */ &Configuration_RTEMS_API, /* pointer to RTEMS API config */ - NULL /* pointer to RTEMS API config */ +#ifdef RTEMS_POSIX_API + &Configuration_POSIX_API /* pointer to POSIX API config */ +#else + NULL /* pointer to POSIX API config */ +#endif }; #endif diff --git a/c/src/exec/sapi/headers/config.h b/c/src/exec/sapi/headers/config.h index d43839e6d6..7ff0f9f485 100644 --- a/c/src/exec/sapi/headers/config.h +++ b/c/src/exec/sapi/headers/config.h @@ -21,7 +21,18 @@ extern "C" { #endif +/* + * This is kind of kludgy but it allows targets to totally ignore the + * POSIX API safely. + */ + +#ifdef RTEMS_POSIX_API #include +#else + +typedef void *posix_api_configuration_table; +#endif + #include /* XXX should cover these diff --git a/c/src/exec/sapi/include/confdefs.h b/c/src/exec/sapi/include/confdefs.h index 8450e43c3c..ea6b837cac 100644 --- a/c/src/exec/sapi/include/confdefs.h +++ b/c/src/exec/sapi/include/confdefs.h @@ -26,6 +26,9 @@ extern rtems_initialization_tasks_table Initialization_tasks[]; extern rtems_driver_address_table Device_drivers[]; extern rtems_configuration_table Configuration; extern rtems_multiprocessing_table Multiprocessing_configuration; +#ifdef RTEMS_POSIX_API +extern posix_api_configuration_table Configuration_POSIX_API; +#endif /* * Default User Initialization Task Table. This table guarantees that @@ -235,6 +238,26 @@ rtems_multiprocessing_table Multiprocessing_configuration = { #define CONFIGURE_INITIAL_EXTENSIONS NULL #endif +/* + * POSIX API Configuration Parameters + */ + +#ifdef RTEMS_POSIX_API + +#ifndef CONFIGURE_MAXIMUM_POSIX_THREADS +#define CONFIGURE_MAXIMUM_POSIX_THREADS 10 +#endif + +#ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES +#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 0 +#endif + +#ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES +#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 0 +#endif + +#endif + /* * Calculate the RAM size based on the maximum number of objects configured. * The model is to estimate the memory required for each configured item, @@ -355,6 +378,16 @@ rtems_api_configuration_table Configuration_RTEMS_API = { Initialization_tasks /* init task(s) table */ }; +#ifdef RTEMS_POSIX_API +posix_api_configuration_table Configuration_POSIX_API = { + CONFIGURE_MAXIMUM_POSIX_THREADS, + CONFIGURE_MAXIMUM_POSIX_MUTEXES, + CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES, + 0, + NULL +}; +#endif + rtems_configuration_table Configuration = { CONFIGURE_EXECUTIVE_RAM_WORK_AREA, CONFIGURE_EXECUTIVE_RAM_SIZE, @@ -368,7 +401,11 @@ rtems_configuration_table Configuration = { CONFIGURE_INITIAL_EXTENSIONS, /* pointer to initial extensions */ CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */ &Configuration_RTEMS_API, /* pointer to RTEMS API config */ - NULL /* pointer to RTEMS API config */ +#ifdef RTEMS_POSIX_API + &Configuration_POSIX_API /* pointer to POSIX API config */ +#else + NULL /* pointer to POSIX API config */ +#endif }; #endif diff --git a/c/src/exec/sapi/include/rtems/config.h b/c/src/exec/sapi/include/rtems/config.h index d43839e6d6..7ff0f9f485 100644 --- a/c/src/exec/sapi/include/rtems/config.h +++ b/c/src/exec/sapi/include/rtems/config.h @@ -21,7 +21,18 @@ extern "C" { #endif +/* + * This is kind of kludgy but it allows targets to totally ignore the + * POSIX API safely. + */ + +#ifdef RTEMS_POSIX_API #include +#else + +typedef void *posix_api_configuration_table; +#endif + #include /* XXX should cover these -- cgit v1.2.3