summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/include/confdefs.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-06-19 23:39:56 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-06-19 23:39:56 +0000
commit659019e3de2235cc49b7bb54eb4a129b728af796 (patch)
tree69812a678c8adb670b9c94bc6817d5b4aee2590a /cpukit/sapi/include/confdefs.h
parent2010-06-19 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-659019e3de2235cc49b7bb54eb4a129b728af796.tar.bz2
2010-06-19 Joel Sherrill <joel.sherrilL@OARcorp.com>
* sapi/include/confdefs.h: Add CONFIGURE_MAXIMUM_FIFOS to account for resources per FIFO instance.
Diffstat (limited to 'cpukit/sapi/include/confdefs.h')
-rw-r--r--cpukit/sapi/include/confdefs.h39
1 files changed, 34 insertions, 5 deletions
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index dbd062a029..d865fb7f1c 100644
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -288,11 +288,19 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
#endif
/**
+ * It should be called FIFOs not pipes
+ */
+#if defined(CONFIGURE_PIPES_ENABLED)
+ #define CONFIGURE_FIFOS_ENABLED
+ #warning "Use CONFIGURE_FIFOS_ENABLED not CONFIGURE_PIPES_ENABLED"
+#endif
+
+/**
* This defines the IMFS file system table entry.
*/
#if !defined(CONFIGURE_FILESYSTEM_ENTRY_IMFS) && \
defined(CONFIGURE_FILESYSTEM_IMFS)
- #if defined(CONFIGURE_PIPES_ENABLED)
+ #if defined(CONFIGURE_FIFOS_ENABLED)
#define CONFIGURE_FILESYSTEM_ENTRY_IMFS \
{ RTEMS_FILESYSTEM_TYPE_IMFS, fifoIMFS_initialize }
#else
@@ -302,6 +310,20 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
#endif
/**
+ * This sets up the resources for the PIPES/FIFOs
+ */
+#if defined(CONFIGURE_FIFOS_ENABLED)
+ #if !defined(CONFIGURE_MAXIMUM_FIFOS)
+ #error "FIFOs enabled but no FIFOs configured."
+ #endif
+ #define CONFIGURE_BARRIERS_FOR_FIFOS (2 * CONFIGURE_MAXIMUM_FIFOS)
+ #define CONFIGURE_SEMAPHORES_FOR_FIFOS (1 + CONFIGURE_MAXIMUM_FIFOS)
+#else
+ #define CONFIGURE_BARRIERS_FOR_FIFOS 0
+ #define CONFIGURE_SEMAPHORES_FOR_FIFOS 0
+#endif
+
+/**
* DEVFS
*/
#if !defined(CONFIGURE_FILESYSTEM_ENTRY_DEVFS) && \
@@ -1132,7 +1154,8 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
#define CONFIGURE_SEMAPHORES \
(CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES + \
- CONFIGURE_TERMIOS_SEMAPHORES + CONFIGURE_LIBBLOCK_SEMAPHORES)
+ CONFIGURE_TERMIOS_SEMAPHORES + CONFIGURE_LIBBLOCK_SEMAPHORES + \
+ CONFIGURE_SEMAPHORES_FOR_FIFOS)
/*
* If there are no user or support semaphores defined, then we can assume
@@ -1187,6 +1210,12 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
#ifndef CONFIGURE_MAXIMUM_BARRIERS
#define CONFIGURE_MAXIMUM_BARRIERS 0
+ #endif
+
+ #define CONFIGURE_BARRIERS \
+ (CONFIGURE_MAXIMUM_BARRIERS + CONFIGURE_BARRIERS_FOR_FIFOS)
+
+ #if CONFIGURE_BARRIERS == 0
#define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) 0
#else
#define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) \
@@ -1727,7 +1756,7 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ) + \
CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
- CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_MAXIMUM_BARRIERS) + \
+ CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_BARRIERS) + \
CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) \
)
@@ -1808,7 +1837,7 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ),
CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS),
CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS),
- CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_MAXIMUM_BARRIERS),
+ CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_BARRIERS),
CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS),
#ifdef RTEMS_POSIX_API
@@ -1865,7 +1894,7 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
CONFIGURE_MAXIMUM_REGIONS,
CONFIGURE_MAXIMUM_PORTS,
CONFIGURE_MAXIMUM_PERIODS,
- CONFIGURE_MAXIMUM_BARRIERS,
+ CONFIGURE_BARRIERS,
CONFIGURE_INIT_TASK_TABLE_SIZE,
CONFIGURE_INIT_TASK_TABLE
};