summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pthreadsetschedparam.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-07-03 11:50:53 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-07-05 07:10:04 +0200
commit77fbbd620f3eb4aa54cccd3491a2feff955f7822 (patch)
treecf96defcbac36450208907795f5fc4963ea57361 /cpukit/posix/src/pthreadsetschedparam.c
parentriscv: Fix fcsr initialization (diff)
downloadrtems-77fbbd620f3eb4aa54cccd3491a2feff955f7822.tar.bz2
posix: Check for new <pthread.h> prototypes
Update #3342. Update #3343.
Diffstat (limited to '')
-rw-r--r--cpukit/posix/src/pthreadsetschedparam.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/cpukit/posix/src/pthreadsetschedparam.c b/cpukit/posix/src/pthreadsetschedparam.c
index b6854a080c..7c5b6f109d 100644
--- a/cpukit/posix/src/pthreadsetschedparam.c
+++ b/cpukit/posix/src/pthreadsetschedparam.c
@@ -33,7 +33,7 @@
static int _POSIX_Set_sched_param(
Thread_Control *the_thread,
int policy,
- struct sched_param *param,
+ const struct sched_param *param,
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
Thread_queue_Context *queue_context
@@ -113,9 +113,13 @@ static int _POSIX_Set_sched_param(
}
int pthread_setschedparam(
- pthread_t thread,
- int policy,
- struct sched_param *param
+ pthread_t thread,
+ int policy,
+#ifdef HAVE_PTHREAD_SETSCHEDPARAM_CONST
+ const struct sched_param *param
+#else
+ struct sched_param *param
+#endif
)
{
Thread_CPU_budget_algorithms budget_algorithm;