summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/condinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/condinit.c')
-rw-r--r--cpukit/posix/src/condinit.c7
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 ) {