summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-05-28 14:16:45 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-05-28 14:16:45 +0000
commit2eba45de912fcc341e9635875f5b2475e9f4ac93 (patch)
treef4cd9fe6eb305e17650e05731f20e6eb5e1cfaa2 /c
parentfixed typo (diff)
downloadrtems-2eba45de912fcc341e9635875f5b2475e9f4ac93.tar.bz2
made posix configuration information conditional so configurations wanting
only the rtems api don't have to include it.
Diffstat (limited to 'c')
-rw-r--r--c/src/exec/sapi/headers/confdefs.h39
-rw-r--r--c/src/exec/sapi/headers/config.h11
-rw-r--r--c/src/exec/sapi/include/confdefs.h39
-rw-r--r--c/src/exec/sapi/include/rtems/config.h11
4 files changed, 98 insertions, 2 deletions
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 <rtems/posix/config.h>
+#else
+
+typedef void *posix_api_configuration_table;
+#endif
+
#include <rtems/rtems/config.h>
/* XXX <rtems/rtems/config.h> 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 <rtems/posix/config.h>
+#else
+
+typedef void *posix_api_configuration_table;
+#endif
+
#include <rtems/rtems/config.h>
/* XXX <rtems/rtems/config.h> should cover these