summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-02-09 19:09:23 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-02-09 19:09:23 +0100
commit16939b1876d2c75534191f5d46ae1c606c3bf2ad (patch)
tree33c157d54952eda72f0b4acd5778dcd2475232ac
parenteb7753437ff858ebe34a08baef7dfdb45eb0f018 (diff)
downloadrtems-16939b1876d2c75534191f5d46ae1c606c3bf2ad.tar.bz2
Filesystem: Simplify FIFO and pipe configuration
-rw-r--r--cpukit/sapi/include/confdefs.h53
-rw-r--r--testsuites/psxtests/psximfs02/init.c1
-rw-r--r--testsuites/psxtests/psxpipe01/init.c1
-rw-r--r--testsuites/sptests/spfifo02/init.c1
-rw-r--r--testsuites/sptests/spfifo03/init.c1
-rw-r--r--testsuites/sptests/spfifo04/init.c3
-rw-r--r--testsuites/sptests/spfifo05/init.c1
7 files changed, 23 insertions, 38 deletions
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index 65d07facf6..211c6bc77f 100644
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -220,6 +220,28 @@ const rtems_libio_helper rtems_fs_init_helper =
#endif
/*
+ * This sets up the resources for the FIFOs/pipes.
+ */
+
+#if !defined(CONFIGURE_MAXIMUM_FIFOS)
+ #define CONFIGURE_MAXIMUM_FIFOS 0
+#endif
+
+#if !defined(CONFIGURE_MAXIMUM_PIPES)
+ #define CONFIGURE_MAXIMUM_PIPES 0
+#endif
+
+#if CONFIGURE_MAXIMUM_FIFOS > 0 || CONFIGURE_MAXIMUM_PIPES > 0
+ #define CONFIGURE_BARRIERS_FOR_FIFOS \
+ (2 * (CONFIGURE_MAXIMUM_FIFOS + CONFIGURE_MAXIMUM_PIPES))
+ #define CONFIGURE_SEMAPHORES_FOR_FIFOS \
+ (1 + (CONFIGURE_MAXIMUM_FIFOS + CONFIGURE_MAXIMUM_PIPES))
+#else
+ #define CONFIGURE_BARRIERS_FOR_FIFOS 0
+ #define CONFIGURE_SEMAPHORES_FOR_FIFOS 0
+#endif
+
+/*
* Filesystems and Mount Table Configuration.
*
* Defines to control the file system:
@@ -342,20 +364,13 @@ const rtems_libio_helper rtems_fs_init_helper =
#endif
#endif
-/**
- * Internall it is called FIFOs not pipes
- */
-#if defined(CONFIGURE_PIPES_ENABLED)
- #define CONFIGURE_FIFOS_ENABLED
-#endif
-
#ifndef RTEMS_SCHEDSIM
/**
* This defines the IMFS file system table entry.
*/
#if !defined(CONFIGURE_FILESYSTEM_ENTRY_IMFS) && \
defined(CONFIGURE_FILESYSTEM_IMFS)
- #if defined(CONFIGURE_FIFOS_ENABLED)
+ #if CONFIGURE_MAXIMUM_FIFOS > 0 || CONFIGURE_MAXIMUM_PIPES > 0
#define CONFIGURE_FILESYSTEM_ENTRY_IMFS \
{ RTEMS_FILESYSTEM_TYPE_IMFS, fifoIMFS_initialize }
#else
@@ -366,28 +381,6 @@ const rtems_libio_helper rtems_fs_init_helper =
#endif
/**
- * This sets up the resources for the PIPES/FIFOs
- */
-#if defined(CONFIGURE_FIFOS_ENABLED)
- #if !defined(CONFIGURE_MAXIMUM_FIFOS) && !defined(CONFIGURE_MAXIMUM_PIPES)
- #error "No FIFOs or PIPES configured"
- #endif
- #if !defined(CONFIGURE_MAXIMUM_FIFOS)
- #define CONFIGURE_MAXIMUM_FIFOS 0
- #endif
- #if !defined(CONFIGURE_MAXIMUM_PIPES)
- #define CONFIGURE_MAXIMUM_PIPES 0
- #endif
- #define CONFIGURE_BARRIERS_FOR_FIFOS \
- (2 * (CONFIGURE_MAXIMUM_FIFOS + CONFIGURE_MAXIMUM_PIPES))
- #define CONFIGURE_SEMAPHORES_FOR_FIFOS \
- (1 + (CONFIGURE_MAXIMUM_FIFOS + CONFIGURE_MAXIMUM_PIPES))
-#else
- #define CONFIGURE_BARRIERS_FOR_FIFOS 0
- #define CONFIGURE_SEMAPHORES_FOR_FIFOS 0
-#endif
-
-/**
* DEVFS
*/
#if !defined(CONFIGURE_FILESYSTEM_ENTRY_DEVFS) && \
diff --git a/testsuites/psxtests/psximfs02/init.c b/testsuites/psxtests/psximfs02/init.c
index c7e2d3c807..00a171fd99 100644
--- a/testsuites/psxtests/psximfs02/init.c
+++ b/testsuites/psxtests/psximfs02/init.c
@@ -217,7 +217,6 @@ rtems_task Init(
#define CONFIGURE_INIT
-#define CONFIGURE_FIFOS_ENABLED
#define CONFIGURE_MAXIMUM_FIFOS 1
#include <rtems/confdefs.h>
diff --git a/testsuites/psxtests/psxpipe01/init.c b/testsuites/psxtests/psxpipe01/init.c
index 59dfe5b145..5dc4909790 100644
--- a/testsuites/psxtests/psxpipe01/init.c
+++ b/testsuites/psxtests/psxpipe01/init.c
@@ -109,7 +109,6 @@ rtems_task Init(
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_PIPES_ENABLED
#define CONFIGURE_MAXIMUM_PIPES 2
#define CONFIGURE_INIT
diff --git a/testsuites/sptests/spfifo02/init.c b/testsuites/sptests/spfifo02/init.c
index 3cb6062e41..64724016a3 100644
--- a/testsuites/sptests/spfifo02/init.c
+++ b/testsuites/sptests/spfifo02/init.c
@@ -214,7 +214,6 @@ rtems_task Init(
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 5
-#define CONFIGURE_FIFOS_ENABLED
#define CONFIGURE_MAXIMUM_FIFOS 1
#define CONFIGURE_INIT
diff --git a/testsuites/sptests/spfifo03/init.c b/testsuites/sptests/spfifo03/init.c
index 198ba54794..0fb024a537 100644
--- a/testsuites/sptests/spfifo03/init.c
+++ b/testsuites/sptests/spfifo03/init.c
@@ -216,7 +216,6 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_BARRIERS 1
#define CONFIGURE_INIT
-#define CONFIGURE_FIFOS_ENABLED
#define CONFIGURE_MAXIMUM_FIFOS 1
diff --git a/testsuites/sptests/spfifo04/init.c b/testsuites/sptests/spfifo04/init.c
index aeb4f069f1..5e2d1c12ee 100644
--- a/testsuites/sptests/spfifo04/init.c
+++ b/testsuites/sptests/spfifo04/init.c
@@ -102,15 +102,12 @@ rtems_task Init(
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 6
#define CONFIGURE_MAXIMUM_TASKS 3
-#define CONFIGURE_MAXIMUM_BARRIERS 1
#define CONFIGURE_MAXIMUM_FIFOS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_FIFOS_ENABLED
-
#define CONFIGURE_INIT
#include <rtems/confdefs.h>
/* end of file */
diff --git a/testsuites/sptests/spfifo05/init.c b/testsuites/sptests/spfifo05/init.c
index 85371541f9..1ccdd49e09 100644
--- a/testsuites/sptests/spfifo05/init.c
+++ b/testsuites/sptests/spfifo05/init.c
@@ -271,7 +271,6 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_BARRIERS 2
#define CONFIGURE_INIT
-#define CONFIGURE_FIFOS_ENABLED
#define CONFIGURE_MAXIMUM_FIFOS 1