diff options
author | bje <bje> | 1998-07-17 08:08:32 +0000 |
---|---|---|
committer | bje <bje> | 1998-07-17 08:08:32 +0000 |
commit | a840c9d7891063e64334dd5d9fcb99a009bbfdf4 (patch) | |
tree | 7dec49bf48824c8cf54c6f8c9cc91b89836ae84d /mutex.c | |
parent | bcd7944d57b506cd3c0e102e8e9d5ced3a38c3ff (diff) |
1998-07-17 Ben Elliston <bje@cygnus.com>
* 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.
Diffstat (limited to 'mutex.c')
-rw-r--r-- | mutex.c | 28 |
1 files changed, 4 insertions, 24 deletions
@@ -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 |