summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-15 13:14:57 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-15 13:57:38 +0200
commit3b47ce73fa67efaeb1c92dc0129efa92f22d747c (patch)
treeadbb3251887d6e07a284bfe10a058c0f08b43e91 /cpukit/posix/src
parentlibio: Remove rtems_libio_t::driver (diff)
downloadrtems-3b47ce73fa67efaeb1c92dc0129efa92f22d747c.tar.bz2
posix: Allow PTHREAD_PROCESS_SHARED for mutexes
Close #3125.
Diffstat (limited to 'cpukit/posix/src')
-rw-r--r--cpukit/posix/src/mutexinit.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/cpukit/posix/src/mutexinit.c b/cpukit/posix/src/mutexinit.c
index 08acb539b5..c7161b0daf 100644
--- a/cpukit/posix/src/mutexinit.c
+++ b/cpukit/posix/src/mutexinit.c
@@ -19,6 +19,7 @@
#endif
#include <rtems/posix/muteximpl.h>
+#include <rtems/posix/posixapi.h>
#include <rtems/posix/priorityimpl.h>
#include <rtems/score/schedulerimpl.h>
@@ -62,14 +63,9 @@ int pthread_mutex_init(
if ( !the_attr->is_initialized )
return EINVAL;
- /*
- * We only support process private mutexes.
- */
- if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
- return ENOSYS;
-
- if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE )
+ if ( !_POSIX_Is_valid_pshared( the_attr->process_shared ) ) {
return EINVAL;
+ }
/*
* Determine the discipline of the mutex