From c030edde3f76f23d6fe64df940a8ca059f0404e6 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 15 Sep 2017 13:48:44 +0200 Subject: posix: Allow PTHREAD_PROCESS_SHARED for condvar Close #3137. --- cpukit/posix/src/condinit.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cpukit') 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 +#include /** * 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 ) { -- cgit v1.2.3