summaryrefslogtreecommitdiff
path: root/attr.c
diff options
context:
space:
mode:
authorrpj <rpj>1998-07-23 17:12:12 +0000
committerrpj <rpj>1998-07-23 17:12:12 +0000
commit63ed0e78ffb72a9f425928344355c2159830b5af (patch)
tree391078160e36b786d62c3505fd2c410607924f79 /attr.c
parent5b4731d25e148347d190d8ceb5f3f7aa2a7dac86 (diff)
Fri Jul 24 03:00:25 1998 Ross Johnson <rpj@ixobrychus.canberra.edu.au>
* 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.
Diffstat (limited to 'attr.c')
-rw-r--r--attr.c30
1 files changed, 15 insertions, 15 deletions
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);
}
@@ -107,6 +107,20 @@ pthread_attr_init(pthread_attr_t *attr)
}
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;
-}