summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads/mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/linuxthreads/mutex.c')
-rw-r--r--libpthread/linuxthreads/mutex.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libpthread/linuxthreads/mutex.c b/libpthread/linuxthreads/mutex.c
index 2123d00bc..2caf8f8ed 100644
--- a/libpthread/linuxthreads/mutex.c
+++ b/libpthread/linuxthreads/mutex.c
@@ -170,6 +170,24 @@ weak_alias (__pthread_mutexattr_gettype, pthread_mutexattr_gettype)
weak_alias (__pthread_mutexattr_gettype, __pthread_mutexattr_getkind_np)
weak_alias (__pthread_mutexattr_getkind_np, pthread_mutexattr_getkind_np)
+int __pthread_mutexattr_getpshared (const pthread_mutexattr_t *attr, int *pshared)
+{
+ *pshared = PTHREAD_PROCESS_PRIVATE;
+ return 0;
+}
+weak_alias (__pthread_mutexattr_getpshared, pthread_mutexattr_getpshared)
+
+int __pthread_mutexattr_setpshared (pthread_mutexattr_t *attr, int pshared)
+{
+ if (pshared != PTHREAD_PROCESS_PRIVATE && pshared != PTHREAD_PROCESS_SHARED)
+ return EINVAL;
+ /* For now it is not possible to shared a conditional variable. */
+ if (pshared != PTHREAD_PROCESS_PRIVATE)
+ return ENOSYS;
+ return 0;
+}
+weak_alias (__pthread_mutexattr_setpshared, pthread_mutexattr_setpshared)
+
/* Once-only execution */
static pthread_mutex_t once_masterlock = PTHREAD_MUTEX_INITIALIZER;