summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/psxtransschedparam.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-15 06:59:57 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-22 14:00:28 +0200
commiteec08efc9048111f47f42142c30a92683bf6756c (patch)
treecad083e49ab757b47487f8489ed48c9204b65c38 /cpukit/posix/src/psxtransschedparam.c
parentposix: Delete POSIX_API_Control::schedparam (diff)
downloadrtems-eec08efc9048111f47f42142c30a92683bf6756c.tar.bz2
posix: Rework sporadic server scheduling policy
Instead of lowering the priority in case the initial budget is consumed raise the priority for each new period. Restore the normal priority once the initial budget is consumed. This makes it later easier to combine the high priority phase with temporary priority boosts (e.g. via priority ceiling and inheritance). Use the thread lock to protect the POSIX thread attributes instead of the thread state lock. This makes it easier to change the thread priority and keep the POSIX attributes consistent. Fixes a false positive use of uninitialized variable warning.
Diffstat (limited to 'cpukit/posix/src/psxtransschedparam.c')
-rw-r--r--cpukit/posix/src/psxtransschedparam.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/cpukit/posix/src/psxtransschedparam.c b/cpukit/posix/src/psxtransschedparam.c
index 89fadde253..fb501b0717 100644
--- a/cpukit/posix/src/psxtransschedparam.c
+++ b/cpukit/posix/src/psxtransschedparam.c
@@ -21,9 +21,7 @@
#include <pthread.h>
#include <errno.h>
-#include <rtems/system.h>
#include <rtems/posix/pthreadimpl.h>
-#include <rtems/posix/priorityimpl.h>
int _POSIX_Thread_Translate_sched_param(
int policy,
@@ -32,9 +30,6 @@ int _POSIX_Thread_Translate_sched_param(
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
- if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
- return EINVAL;
-
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
@@ -66,9 +61,6 @@ int _POSIX_Thread_Translate_sched_param(
_Timespec_To_ticks( &param->sched_ss_init_budget ) )
return EINVAL;
- if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
- return EINVAL;
-
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;