summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-04-25 19:51:12 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-04-25 19:51:12 +0000
commit85e0a2201f8c2e8455929d36db666f4cac0a6be7 (patch)
treedcefe20919ef4e1d32dd24a97488b210ff612445 /cpukit
parent2010-04-25 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-85e0a2201f8c2e8455929d36db666f4cac0a6be7.tar.bz2
2010-04-25 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/src/pthread.c: Make default pthread_attr_t match the conditionals in the version in newlib. This way it will always be right.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/posix/src/pthread.c13
2 files changed, 15 insertions, 4 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 259ce4086c..9f2645d753 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,11 @@
2010-04-25 Joel Sherrill <joel.sherrill@oarcorp.com>
+ * posix/src/pthread.c: Make default pthread_attr_t match the
+ conditionals in the version in newlib. This way it will always be
+ right.
+
+2010-04-25 Joel Sherrill <joel.sherrill@oarcorp.com>
+
* libcsupport/src/readv.c: Check for < 0 on iov_len, not <= 0. A
readv() with all iov_len equal to 0 should have no effect.
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index 6db3b08ced..45d0ff18fd 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/posix/src/pthread.c
@@ -48,12 +48,17 @@ const pthread_attr_t _POSIX_Threads_Default_attributes = {
SCHED_FIFO, /* schedpolicy */
{ /* schedparam */
2, /* sched_priority */
- 0, /* sched_ss_low_priority */
- { 0L, 0 }, /* sched_ss_repl_period */
- { 0L, 0 } /* sched_ss_init_budget */
+ #if defined(_POSIX_SPORADIC_SERVER) || \
+ defined(_POSIX_THREAD_SPORADIC_SERVER)
+ 0, /* sched_ss_low_priority */
+ { 0L, 0 }, /* sched_ss_repl_period */
+ { 0L, 0 } /* sched_ss_init_budget */
+ #endif
},
+ #if defined(_POSIX_THREAD_CPUTIME)
+ 1, /* cputime_clock_allowed */
+ #endif
PTHREAD_CREATE_JOINABLE, /* detachstate */
- 1 /* cputime_clock_allowed */
};
/*