From 252f321a08fdc29c103591834fbf01945db59ff0 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sun, 14 Jul 2002 06:52:23 +0000 Subject: Add missing pthread_condattr_getpshared and pthread_condattr_setpshared -Erik --- libpthread/linuxthreads/condvar.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'libpthread') diff --git a/libpthread/linuxthreads/condvar.c b/libpthread/linuxthreads/condvar.c index 85754a18f..405d9bab4 100644 --- a/libpthread/linuxthreads/condvar.c +++ b/libpthread/linuxthreads/condvar.c @@ -415,3 +415,22 @@ int pthread_condattr_destroy(pthread_condattr_t *attr) { return 0; } + +int pthread_condattr_getpshared (const pthread_condattr_t *attr, int *pshared) +{ + *pshared = PTHREAD_PROCESS_PRIVATE; + return 0; +} + +int pthread_condattr_setpshared (pthread_condattr_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; +} + -- cgit v1.2.3