From 63ed0e78ffb72a9f425928344355c2159830b5af Mon Sep 17 00:00:00 2001 From: rpj Date: Thu, 23 Jul 1998 17:12:12 +0000 Subject: Fri Jul 24 03:00:25 1998 Ross Johnson * attr.c (pthread_attr_destroy): Fix merge conflicts. (pthread_attr_getdetachstate): Fix merge conflicts. (pthread_attr_setdetachstate): Fix merge conflicts. * pthread.h: Fix merge conflicts. * sync.c (pthread_join): Fix merge conflicts. --- attr.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'attr.c') diff --git a/attr.c b/attr.c index 0e72575..22332c0 100644 --- a/attr.c +++ b/attr.c @@ -11,7 +11,7 @@ static int is_attr(pthread_attr_t *attr) { - /* Return 0 if the attr object is valid, 1 otherwise. */ + /* Return 0 if the attr object is valid, non-zero otherwise. */ return (attr == NULL || attr->valid != _PTHREAD_ATTR_VALID); } @@ -106,6 +106,20 @@ pthread_attr_init(pthread_attr_t *attr) return 0; } +int +pthread_attr_destroy(pthread_attr_t *attr) +{ + if (is_attr(attr) != 0) + { + return EINVAL; + } + + /* Set the attribute object to a specific invalid value. */ + attr->valid = _PTHREAD_ATTR_INVALID; + + return 0; +} + int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate) @@ -137,17 +151,3 @@ pthread_attr_setdetachstate(pthread_attr_t *attr, attr->detached = detachstate; return 0; } - -int -pthread_attr_destroy(pthread_attr_t *attr) -{ - if (is_attr(attr) != 0) - { - return EINVAL; - } - - /* Set the attribute object to a specific invalid value. */ - attr->valid = _PTHREAD_ATTR_INVALID; - - return 0; -} -- cgit v1.2.3