summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pthreadsetschedprio.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-14 15:57:54 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-22 14:00:28 +0200
commit5a32c486f9b7bd8687af253931b47d7abb091bc3 (patch)
tree31f97524b91bb123eb316b00e8056e5d62cf5200 /cpukit/posix/src/pthreadsetschedprio.c
parentposix: Rework sporadic server scheduling policy (diff)
downloadrtems-5a32c486f9b7bd8687af253931b47d7abb091bc3.tar.bz2
posix: Make POSIX API aware of scheduler instances
Diffstat (limited to 'cpukit/posix/src/pthreadsetschedprio.c')
-rw-r--r--cpukit/posix/src/pthreadsetschedprio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpukit/posix/src/pthreadsetschedprio.c b/cpukit/posix/src/pthreadsetschedprio.c
index 25dc59fb11..dace70ad1f 100644
--- a/cpukit/posix/src/pthreadsetschedprio.c
+++ b/cpukit/posix/src/pthreadsetschedprio.c
@@ -16,6 +16,7 @@
#include <rtems/posix/priorityimpl.h>
#include <rtems/posix/threadsup.h>
#include <rtems/score/threadimpl.h>
+#include <rtems/score/schedulerimpl.h>
typedef struct {
int prio;
@@ -30,19 +31,21 @@ static bool _POSIX_Set_sched_prio_filter(
{
POSIX_Set_sched_prio_context *context;
int prio;
+ const Scheduler_Control *scheduler;
POSIX_API_Control *api;
Priority_Control current_priority;
Priority_Control new_priority;
context = arg;
prio = context->prio;
+ scheduler = _Scheduler_Get_own( the_thread );
- if ( !_POSIX_Priority_Is_valid( prio ) ) {
+ if ( !_POSIX_Priority_Is_valid( scheduler, prio ) ) {
context->error = EINVAL;
return false;
}
- new_priority = _POSIX_Priority_To_core( prio );
+ new_priority = _POSIX_Priority_To_core( scheduler, prio );
*new_priority_p = new_priority;
current_priority = the_thread->current_priority;