aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/rwlock.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-06 22:01:12 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-06 22:01:12 +0000
commita85d5c806068dc0d6332390c7a87e60ccd99be9a (patch)
tree86e578ddd361c9ed1cf71194346d069f74cefcb9 /linuxthreads/rwlock.c
parent16f4ce383717857032c2033ef755da389716150a (diff)
downloadglibc-a85d5c806068dc0d6332390c7a87e60ccd99be9a.zip
glibc-a85d5c806068dc0d6332390c7a87e60ccd99be9a.tar.gz
glibc-a85d5c806068dc0d6332390c7a87e60ccd99be9a.tar.bz2
Update.
2000-07-06 Ulrich Drepper <drepper@redhat.com> * condvar.c: Implement pthread_condattr_getpshared and pthread_condattr_setpshared. * mutex.c: Implement pthread_mutexattr_getpshared and pthread_mutexattr_setpshared. * Versions: Export new functions. * sysdeps/pthread/pthread.h: Add prototypes for new functions. * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE. (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE is not selected.
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 2bcdf97..9258978 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;