summaryrefslogtreecommitdiff
path: root/mutex.c
diff options
context:
space:
mode:
authorbje <bje>1998-07-17 08:16:43 +0000
committerbje <bje>1998-07-17 08:16:43 +0000
commitae0a43e37e725e5187b6f1ad2afba9a35f882c19 (patch)
treec444a7a70bd034b4f0b62fcce255e2a1de84a836 /mutex.c
parent7c4736c01ce65d4058ba16c6a4f3ce0bcb23da79 (diff)
1998-07-17 Ben Elliston <bje@cygnus.com>
* mutex.c (pthread_mutexattr_init): No need to malloc any storage; the attributes structure is now empty. (pthread_mutexattr_destroy): This is now a nop.
Diffstat (limited to 'mutex.c')
-rw-r--r--mutex.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/mutex.c b/mutex.c
index 61add6e..e03f070 100644
--- a/mutex.c
+++ b/mutex.c
@@ -81,25 +81,14 @@ pthread_mutexattr_init(pthread_mutexattr_t *attr)
return EINVAL;
}
- attr->ptr = malloc(sizeof(_pthread_mutexattr_t));
- if (attr->ptr == NULL)
- {
- return ENOMEM;
- }
-
- (_pthread_mutexattr_t *) (attr->ptr).proc_shared = PTHREAD_PROCESS_PRIVATE;
+ /* None of the optional attributes are supported yet. */
return 0;
}
int
pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
{
- if (is_attr(attr) != 0)
- {
- return EINVAL;
- }
-
- free(attr->ptr);
+ /* Nothing to do. */
return 0;
}