mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user