From a840c9d7891063e64334dd5d9fcb99a009bbfdf4 Mon Sep 17 00:00:00 2001 From: bje Date: Fri, 17 Jul 1998 08:08:32 +0000 Subject: 1998-07-17 Ben Elliston * mutex.c (pthread_mutexattr_setpshared): This optional function is no longer supported, since we want to implement POSIX mutex variables using the much more efficient Win32 critical section primitives. Critical section objects in Win32 cannot be shared between processes. (pthread_mutexattr_getpshared): Likewise. --- mutex.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) (limited to 'mutex.c') diff --git a/mutex.c b/mutex.c index a4bfd55..61add6e 100644 --- a/mutex.c +++ b/mutex.c @@ -106,36 +106,16 @@ pthread_mutexattr_destroy(pthread_mutexattr_t *attr) int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int process_shared) { - /* Ensure the value for this attribute is within the legal range. */ - if ((process_shared != PTHREAD_PROCESS_PRIVATE) || - (process_shared != PTHREAD_PROCESS_SHARED)) - { - return EINVAL; - } - - /* Ensure attr points to a valid attribute object. */ - if (is_attr(attr) != 0) - { - return EINVAL; - } - - /* Everything is okay. */ - (_pthread_mutexattr_t *) (attr->ptr)->proc_shared = process_shared; - return 0; + /* This function is not supported. */ + return ENOSYS; } int pthread_mutexattr_getpshared(const pthread_mutexattr_t *attr, int *process_shared) { - if (is_attr(attr) != 0) - { - return EINVAL; - } - - /* Everything is okay. */ - *process_shared = (_pthread_mutexattr_t *) (attr->ptr)->proc_shared; - return 0; + /* This function is not supported. */ + return ENOSYS; } int -- cgit v1.2.3