summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_mutexattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libthr/thread/thr_mutexattr.c')
-rw-r--r--lib/libthr/thread/thr_mutexattr.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_mutexattr.c b/lib/libthr/thread/thr_mutexattr.c
index 042ff87..ecfd1da 100644
--- a/lib/libthr/thread/thr_mutexattr.c
+++ b/lib/libthr/thread/thr_mutexattr.c
@@ -77,6 +77,8 @@ __weak_reference(_pthread_mutexattr_getkind_np, pthread_mutexattr_getkind_np);
__weak_reference(_pthread_mutexattr_gettype, pthread_mutexattr_gettype);
__weak_reference(_pthread_mutexattr_settype, pthread_mutexattr_settype);
__weak_reference(_pthread_mutexattr_destroy, pthread_mutexattr_destroy);
+__weak_reference(_pthread_mutexattr_getpshared, pthread_mutexattr_getpshared);
+__weak_reference(_pthread_mutexattr_setpshared, pthread_mutexattr_setpshared);
int
_pthread_mutexattr_init(pthread_mutexattr_t *attr)
@@ -165,3 +167,29 @@ _pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
}
return(ret);
}
+
+int
+_pthread_mutexattr_getpshared(const pthread_mutexattr_t *attr,
+ int *pshared)
+{
+
+ if (attr == NULL || *attr == NULL)
+ return (EINVAL);
+
+ *pshared = PTHREAD_PROCESS_PRIVATE;
+ return (0);
+}
+
+int
+_pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared)
+{
+
+ if (attr == NULL || *attr == NULL)
+ return (EINVAL);
+
+ /* Only PTHREAD_PROCESS_PRIVATE is supported. */
+ if (pshared != PTHREAD_PROCESS_PRIVATE)
+ return (EINVAL);
+
+ return (0);
+}
OpenPOWER on IntegriCloud