summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/tasksetpriority.c
diff options
context:
space:
mode:
authorGedare Bloom <gedare@rtems.org>2017-12-21 13:04:50 -0500
committerGedare Bloom <gedare@rtems.org>2018-03-23 11:33:59 -0400
commitb50468c6bff4e770aa038b9f87e514a2a1da906b (patch)
tree3313ec0f840e8ae24828dc33187adf71682d07b4 /cpukit/rtems/src/tasksetpriority.c
parentscore: replace current and real priority with priority node (diff)
downloadrtems-b50468c6bff4e770aa038b9f87e514a2a1da906b.tar.bz2
score: add Inherited_priorities priority queue and functions
Adds enqueue, dequeue, requeue, evaluate, and release functions for the thread priority node priority queue of inherited priorities. Add calls to these functions as needed to maintain the priority queue due to blocking, unblocking, and priority changes. Closes #3359.
Diffstat (limited to 'cpukit/rtems/src/tasksetpriority.c')
-rw-r--r--cpukit/rtems/src/tasksetpriority.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/cpukit/rtems/src/tasksetpriority.c b/cpukit/rtems/src/tasksetpriority.c
index 6f365f4ab7..2b5b0625ec 100644
--- a/cpukit/rtems/src/tasksetpriority.c
+++ b/cpukit/rtems/src/tasksetpriority.c
@@ -75,9 +75,7 @@ rtems_status_code rtems_task_set_priority(
*old_priority = the_thread->Priority_node.current_priority;
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
the_thread->Priority_node.real_priority = new_priority;
- if ( the_thread->resource_count == 0 ||
- the_thread->Priority_node.current_priority > new_priority )
- _Thread_Change_priority( the_thread, new_priority, false );
+ _Thread_Evaluate_priority( the_thread );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;