aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/rwlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/rwlock.c')
-rw-r--r--linuxthreads/rwlock.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/linuxthreads/rwlock.c b/linuxthreads/rwlock.c
index 2bcdf97de0..9258978e2f 100644
--- a/linuxthreads/rwlock.c
+++ b/linuxthreads/rwlock.c
@@ -596,7 +596,7 @@ int
pthread_rwlockattr_init (pthread_rwlockattr_t *attr)
{
attr->__lockkind = 0;
- attr->__pshared = 0;
+ attr->__pshared = PTHREAD_PROCESS_PRIVATE;
return 0;
}
@@ -624,6 +624,10 @@ pthread_rwlockattr_setpshared (pthread_rwlockattr_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;
+
attr->__pshared = pshared;
return 0;