diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-12-11 16:45:37 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-12-11 17:45:31 +0100 |
commit | b1b6dd71d0d4609e81e14cbc94ef3dafa06712ba (patch) | |
tree | 56af4d445f39f5fa92b9c914dc5818ad52fb2bf8 /cpukit/include | |
parent | Support pasring - in a version string (diff) | |
download | rtems-b1b6dd71d0d4609e81e14cbc94ef3dafa06712ba.tar.bz2 |
pipe: Use condition variables
Use self-contained condition variables instead of Classic API barriers.
This simplifies the implementation and configuration.
Update #3840.
Diffstat (limited to 'cpukit/include')
-rw-r--r-- | cpukit/include/rtems/confdefs.h | 22 | ||||
-rw-r--r-- | cpukit/include/rtems/pipe.h | 4 |
2 files changed, 4 insertions, 22 deletions
diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h index 922e4d7a9d..2e48af3f7a 100644 --- a/cpukit/include/rtems/confdefs.h +++ b/cpukit/include/rtems/confdefs.h @@ -213,17 +213,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[]; #define CONFIGURE_MAXIMUM_PIPES 0 #endif -/* - * This specifies the number of barriers required for the configured - * number of FIFOs and named pipes. - */ -#if CONFIGURE_MAXIMUM_FIFOS > 0 || CONFIGURE_MAXIMUM_PIPES > 0 - #define _CONFIGURE_BARRIERS_FOR_FIFOS \ - (2 * (CONFIGURE_MAXIMUM_FIFOS + CONFIGURE_MAXIMUM_PIPES)) -#else - #define _CONFIGURE_BARRIERS_FOR_FIFOS 0 -#endif - /** * @defgroup ConfigFilesystems Filesystems and Mount Table Configuration * @@ -2041,13 +2030,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[]; #define CONFIGURE_MAXIMUM_BARRIERS 0 #endif -/* - * This macro is calculated to specify the number of Classic API - * Barriers required by the application and configured capabilities. - */ -#define _CONFIGURE_BARRIERS \ - (CONFIGURE_MAXIMUM_BARRIERS + _CONFIGURE_BARRIERS_FOR_FIFOS) - #ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS /** * This configuration parameter specifies the maximum number of @@ -2737,8 +2719,8 @@ struct _reent *__getreent(void) _CONFIGURE_IDLE_TASKS_COUNT + _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT ); - #if _CONFIGURE_BARRIERS > 0 - BARRIER_INFORMATION_DEFINE( _CONFIGURE_BARRIERS ); + #if CONFIGURE_MAXIMUM_BARRIERS > 0 + BARRIER_INFORMATION_DEFINE( CONFIGURE_MAXIMUM_BARRIERS ); #endif #if CONFIGURE_MAXIMUM_MESSAGE_QUEUES > 0 diff --git a/cpukit/include/rtems/pipe.h b/cpukit/include/rtems/pipe.h index 083e1343e9..eb016ed0a6 100644 --- a/cpukit/include/rtems/pipe.h +++ b/cpukit/include/rtems/pipe.h @@ -47,8 +47,8 @@ typedef struct pipe_control { unsigned int readerCounter; /* incremental counters */ unsigned int writerCounter; /* for differentiation of successive opens */ rtems_mutex Mutex; - rtems_id readBarrier; /* wait queues */ - rtems_id writeBarrier; + rtems_condition_variable readBarrier; /* wait queues */ + rtems_condition_variable writeBarrier; #if 0 boolean Anonymous; /* anonymous pipe or FIFO */ #endif |