summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/scheduleredfupdate.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src/scheduleredfupdate.c')
-rw-r--r--cpukit/score/src/scheduleredfupdate.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/cpukit/score/src/scheduleredfupdate.c b/cpukit/score/src/scheduleredfupdate.c
index dfa2e81281..5d475fe5f1 100644
--- a/cpukit/score/src/scheduleredfupdate.c
+++ b/cpukit/score/src/scheduleredfupdate.c
@@ -26,16 +26,13 @@ void _Scheduler_EDF_Update_priority(
Priority_Control new_priority
)
{
- Scheduler_EDF_Node *node = _Scheduler_EDF_Thread_get_node( the_thread );
+ Scheduler_EDF_Node *node;
- (void) scheduler;
- (void) new_priority;
+ node = _Scheduler_EDF_Thread_get_node( the_thread );
- if (node->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) {
- /* Shifts the priority to the region of background tasks. */
- the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB);
- the_thread->real_priority = the_thread->Start.initial_priority;
- the_thread->current_priority = the_thread->Start.initial_priority;
- node->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY;
+ if ( ( new_priority & SCHEDULER_EDF_PRIO_MSB ) != 0 ) {
+ node->background_priority = new_priority;
}
+
+ node->current_priority = new_priority;
}