diff options
author | Thomas Schwinge <thomas@schwinge.name> | 2011-09-07 18:40:56 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@schwinge.name> | 2011-09-07 18:40:56 +0200 |
commit | b9d918c0f28908c7012c9d4f65f1cf2bc103fc4b (patch) | |
tree | aa3ad24977c9dcbe1aed672431d47f035cad85ae /sysdeps | |
parent | 0d733170f4056ffef9ae7e3c1f0e627b47433a97 (diff) | |
parent | c2a1b325b7b2ce0d3d16bd1e9430e1d7eddce71e (diff) |
Merge commit 'refs/top-bases/t/fix_have_kernel_resources' into t/fix_have_kernel_resources
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/bits/cancelation.h | 3 | ||||
-rw-r--r-- | sysdeps/generic/bits/condition-attr.h | 4 | ||||
-rw-r--r-- | sysdeps/generic/bits/thread-attr.h | 5 | ||||
-rw-r--r-- | sysdeps/generic/pt-attr-getschedparam.c | 2 | ||||
-rw-r--r-- | sysdeps/generic/pt-attr-setschedparam.c | 2 |
5 files changed, 7 insertions, 9 deletions
diff --git a/sysdeps/generic/bits/cancelation.h b/sysdeps/generic/bits/cancelation.h index db9169a..46486f5 100644 --- a/sysdeps/generic/bits/cancelation.h +++ b/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/sysdeps/generic/bits/condition-attr.h b/sysdeps/generic/bits/condition-attr.h index a131128..4cd4e8c 100644 --- a/sysdeps/generic/bits/condition-attr.h +++ b/sysdeps/generic/bits/condition-attr.h @@ -20,7 +20,7 @@ #ifndef _BITS_CONDITION_ATTR_H #define _BITS_CONDITION_ATTR_H 1 -#include <time.h> +#include <bits/types.h> enum __pthread_process_shared; @@ -28,7 +28,7 @@ enum __pthread_process_shared; struct __pthread_condattr { enum __pthread_process_shared pshared; - clockid_t clock; + __clockid_t clock; }; #endif /* bits/condition.h */ diff --git a/sysdeps/generic/bits/thread-attr.h b/sysdeps/generic/bits/thread-attr.h index c3a93fd..f2e55f2 100644 --- a/sysdeps/generic/bits/thread-attr.h +++ b/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/sysdeps/generic/pt-attr-getschedparam.c b/sysdeps/generic/pt-attr-getschedparam.c index 25afebd..6c3f15b 100644 --- a/sysdeps/generic/pt-attr-getschedparam.c +++ b/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/sysdeps/generic/pt-attr-setschedparam.c b/sysdeps/generic/pt-attr-setschedparam.c index 18a575e..5459f10 100644 --- a/sysdeps/generic/pt-attr-setschedparam.c +++ b/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; } |