summaryrefslogtreecommitdiff
path: root/mutex.c
diff options
context:
space:
mode:
authorbje <bje>1998-07-17 08:08:32 +0000
committerbje <bje>1998-07-17 08:08:32 +0000
commita840c9d7891063e64334dd5d9fcb99a009bbfdf4 (patch)
tree7dec49bf48824c8cf54c6f8c9cc91b89836ae84d /mutex.c
parentbcd7944d57b506cd3c0e102e8e9d5ced3a38c3ff (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.c28
1 files changed, 4 insertions, 24 deletions
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