From ae0a43e37e725e5187b6f1ad2afba9a35f882c19 Mon Sep 17 00:00:00 2001 From: bje Date: Fri, 17 Jul 1998 08:16:43 +0000 Subject: 1998-07-17 Ben Elliston * 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. --- mutex.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'mutex.c') 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; } -- cgit v1.2.3