diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-15 13:48:44 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-15 13:57:53 +0200 |
commit | c030edde3f76f23d6fe64df940a8ca059f0404e6 (patch) | |
tree | 20651d2bb3a61821bc7d0cccf93f3851b3109994 /cpukit/posix/src | |
parent | posix: Allow PTHREAD_PROCESS_SHARED for barriers (diff) | |
download | rtems-c030edde3f76f23d6fe64df940a8ca059f0404e6.tar.bz2 |
posix: Allow PTHREAD_PROCESS_SHARED for condvar
Close #3137.
Diffstat (limited to 'cpukit/posix/src')
-rw-r--r-- | cpukit/posix/src/condinit.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cpukit/posix/src/condinit.c b/cpukit/posix/src/condinit.c index e863dcd183..8d3aa8e244 100644 --- a/cpukit/posix/src/condinit.c +++ b/cpukit/posix/src/condinit.c @@ -19,6 +19,7 @@ #endif #include <rtems/posix/condimpl.h> +#include <rtems/posix/posixapi.h> /** * 11.4.2 Initializing and Destroying a Condition Variable, @@ -38,12 +39,14 @@ int pthread_cond_init( /* * Be careful about attributes when global!!! */ - if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) - return EINVAL; if ( !the_attr->is_initialized ) return EINVAL; + if ( !_POSIX_Is_valid_pshared( the_attr->process_shared ) ) { + return EINVAL; + } + the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { |