summaryrefslogtreecommitdiff
path: root/attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'attr.c')
-rw-r--r--attr.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/attr.c b/attr.c
index 03c254b..72b5011 100644
--- a/attr.c
+++ b/attr.c
@@ -7,9 +7,10 @@
#include "pthread.h"
#include "implement.h"
+#include <string.h>
static int
-is_attr(pthread_attr_t *attr)
+is_attr(const pthread_attr_t *attr)
{
/* Return 0 if the attr object is valid, non-zero otherwise. */
@@ -98,14 +99,11 @@ pthread_attr_init(pthread_attr_t *attr)
attr->stacksize = PTHREAD_STACK_MIN;
#endif
- attr->cancelstate = PTHREAD_CANCEL_ENABLE;
- attr->canceltype = PTHREAD_CANCEL_DEFERRED;
- attr->cancel_pending = FALSE;
attr->detachedstate = PTHREAD_CREATE_JOINABLE;
memset(&(attr->sigmask), 0, sizeof(sigset_t));
/* Priority uses Win32 priority values. */
- int priority = THREAD_PRIORITY_NORMAL;
+ attr->priority = THREAD_PRIORITY_NORMAL;
attr->valid = _PTHREAD_ATTR_VALID;