diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-15 13:14:57 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-15 13:57:38 +0200 |
commit | 3b47ce73fa67efaeb1c92dc0129efa92f22d747c (patch) | |
tree | adbb3251887d6e07a284bfe10a058c0f08b43e91 /cpukit/posix/src/mutexinit.c | |
parent | libio: Remove rtems_libio_t::driver (diff) | |
download | rtems-3b47ce73fa67efaeb1c92dc0129efa92f22d747c.tar.bz2 |
posix: Allow PTHREAD_PROCESS_SHARED for mutexes
Close #3125.
Diffstat (limited to 'cpukit/posix/src/mutexinit.c')
-rw-r--r-- | cpukit/posix/src/mutexinit.c | 10 |
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 |