summaryrefslogtreecommitdiff
path: root/libpthread/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/sysdeps')
-rw-r--r--libpthread/sysdeps/generic/bits/cancelation.h3
-rw-r--r--libpthread/sysdeps/generic/bits/thread-attr.h5
-rw-r--r--libpthread/sysdeps/generic/pt-attr-getschedparam.c2
-rw-r--r--libpthread/sysdeps/generic/pt-attr-setschedparam.c2
4 files changed, 5 insertions, 7 deletions
diff --git a/libpthread/sysdeps/generic/bits/cancelation.h b/libpthread/sysdeps/generic/bits/cancelation.h
index db9169a9..46486f5e 100644
--- a/libpthread/sysdeps/generic/bits/cancelation.h
+++ b/libpthread/sysdeps/generic/bits/cancelation.h
@@ -20,8 +20,6 @@
#ifndef _BITS_CANCELATION_H
#define _BITS_CANCELATION_H 1
-#include <assert.h>
-
struct __pthread_cancelation_handler
{
void (*handler)(void *);
@@ -47,7 +45,6 @@ struct __pthread_cancelation_handler **__pthread_get_cleanup_stack (void);
#define __pthread_cleanup_pop(execute) \
if (execute) \
__handler.handler (__handler.arg); \
- assert (*__handlers == &__handler); \
*__handlers = __handler.next; \
}
diff --git a/libpthread/sysdeps/generic/bits/thread-attr.h b/libpthread/sysdeps/generic/bits/thread-attr.h
index c3a93fde..f2e55f2b 100644
--- a/libpthread/sysdeps/generic/bits/thread-attr.h
+++ b/libpthread/sysdeps/generic/bits/thread-attr.h
@@ -20,7 +20,8 @@
#ifndef _BITS_THREAD_ATTR_H
#define _BITS_THREAD_ATTR_H 1
-#include <sched.h>
+#define __need_schedparam
+#include <bits/sched.h>
enum __pthread_detachstate;
enum __pthread_inheritsched;
@@ -30,7 +31,7 @@ enum __pthread_contentionscope;
that not all of them are supported on all systems. */
struct __pthread_attr
{
- struct sched_param schedparam;
+ struct __sched_param schedparam;
void *stackaddr;
size_t stacksize;
size_t guardsize;
diff --git a/libpthread/sysdeps/generic/pt-attr-getschedparam.c b/libpthread/sysdeps/generic/pt-attr-getschedparam.c
index 25afebd0..6c3f15be 100644
--- a/libpthread/sysdeps/generic/pt-attr-getschedparam.c
+++ b/libpthread/sysdeps/generic/pt-attr-getschedparam.c
@@ -26,6 +26,6 @@ int
pthread_attr_getschedparam (const pthread_attr_t *attr,
struct sched_param *param)
{
- *param = attr->schedparam;
+ memcpy (param, &attr->schedparam, sizeof *param);
return 0;
}
diff --git a/libpthread/sysdeps/generic/pt-attr-setschedparam.c b/libpthread/sysdeps/generic/pt-attr-setschedparam.c
index 18a575ec..5459f108 100644
--- a/libpthread/sysdeps/generic/pt-attr-setschedparam.c
+++ b/libpthread/sysdeps/generic/pt-attr-setschedparam.c
@@ -30,7 +30,7 @@ pthread_attr_setschedparam (pthread_attr_t *attr,
if (memcmp (param, &__pthread_default_attr.schedparam,
sizeof *param) == 0)
{
- attr->schedparam = *param;
+ memcpy (&attr->schedparam, param, sizeof *param);
return 0;
}