summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include
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/include
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/include')
-rw-r--r--cpukit/posix/include/rtems/posix/posixapi.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/cpukit/posix/include/rtems/posix/posixapi.h b/cpukit/posix/include/rtems/posix/posixapi.h
index 1a64cf7a1d..2441a2ee6f 100644
--- a/cpukit/posix/include/rtems/posix/posixapi.h
+++ b/cpukit/posix/include/rtems/posix/posixapi.h
@@ -26,6 +26,8 @@
#include <rtems/score/threadimpl.h>
#include <rtems/seterr.h>
+#include <pthread.h>
+
/**
* @defgroup POSIXAPI RTEMS POSIX API
*
@@ -125,6 +127,19 @@ RTEMS_INLINE_ROUTINE int _POSIX_Zero_or_minus_one_plus_errno(
} \
return (type *) the_object
+/*
+ * See also The Open Group Base Specifications Issue 7, IEEE Std 1003.1-2008,
+ * 2016 Edition, subsection 2.9.9, Synchronization Object Copies and
+ * Alternative Mappings.
+ *
+ * http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_09_09
+ */
+RTEMS_INLINE_ROUTINE bool _POSIX_Is_valid_pshared( int pshared )
+{
+ return pshared == PTHREAD_PROCESS_PRIVATE ||
+ pshared == PTHREAD_PROCESS_SHARED;
+}
+
/** @} */
#endif