From b50468c6bff4e770aa038b9f87e514a2a1da906b Mon Sep 17 00:00:00 2001 From: Gedare Bloom Date: Thu, 21 Dec 2017 13:04:50 -0500 Subject: 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. --- cpukit/rtems/src/tasksetpriority.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cpukit/rtems/src/tasksetpriority.c') 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; -- cgit v1.2.3