summaryrefslogtreecommitdiffstats
path: root/cpukit/posix
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
parentriscv: Fix fcsr initialization (diff)
downloadrtems-77fbbd620f3eb4aa54cccd3491a2feff955f7822.tar.bz2
posix: Check for new <pthread.h> prototypes
Update #3342. Update #3343.
Diffstat (limited to 'cpukit/posix')
-rw-r--r--cpukit/posix/src/mutexgetprioceiling.c10
-rw-r--r--cpukit/posix/src/psxtransschedparam.c2
-rw-r--r--cpukit/posix/src/pthreadsetschedparam.c12
3 files changed, 16 insertions, 8 deletions
diff --git a/cpukit/posix/src/mutexgetprioceiling.c b/cpukit/posix/src/mutexgetprioceiling.c
index 544c8fbf33..3ac90d888e 100644
--- a/cpukit/posix/src/mutexgetprioceiling.c
+++ b/cpukit/posix/src/mutexgetprioceiling.c
@@ -26,8 +26,12 @@
*/
int pthread_mutex_getprioceiling(
- pthread_mutex_t *mutex,
- int *prioceiling
+#ifdef HAVE_PTHREAD_MUTEX_GETCEILING_CONST
+ const pthread_mutex_t *mutex,
+#else
+ pthread_mutex_t *mutex,
+#endif
+ int *prioceiling
)
{
POSIX_Mutex_Control *the_mutex;
@@ -38,7 +42,7 @@ int pthread_mutex_getprioceiling(
return EINVAL;
}
- the_mutex = _POSIX_Mutex_Get( mutex );
+ the_mutex = _POSIX_Mutex_Get( RTEMS_DECONST( pthread_mutex_t *, mutex ) );
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
_POSIX_Mutex_Acquire( the_mutex, &queue_context );
diff --git a/cpukit/posix/src/psxtransschedparam.c b/cpukit/posix/src/psxtransschedparam.c
index 86d8ff0894..0b4ce2823e 100644
--- a/cpukit/posix/src/psxtransschedparam.c
+++ b/cpukit/posix/src/psxtransschedparam.c
@@ -42,7 +42,7 @@ int _POSIX_Thread_Translate_to_sched_policy(
int _POSIX_Thread_Translate_sched_param(
int policy,
- struct sched_param *param,
+ const struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
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;