summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadqextractpriority.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/score/src/threadqextractpriority.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/score/src/threadqextractpriority.c')
-rw-r--r--cpukit/score/src/threadqextractpriority.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cpukit/score/src/threadqextractpriority.c b/cpukit/score/src/threadqextractpriority.c
index f314f75da9..5c8188d661 100644
--- a/cpukit/score/src/threadqextractpriority.c
+++ b/cpukit/score/src/threadqextractpriority.c
@@ -18,6 +18,7 @@
#include <rtems/system.h>
#include <rtems/score/chain.h>
+#include <rtems/score/coremutex.h>
#include <rtems/score/isr.h>
#include <rtems/score/object.h>
#include <rtems/score/states.h>
@@ -57,6 +58,7 @@ bool _Thread_queue_Extract_priority_helper(
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
+ CORE_mutex_Control *mutex;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
@@ -106,6 +108,9 @@ bool _Thread_queue_Extract_priority_helper(
return true;
}
+ mutex = _Thread_Dequeue_priority_node( &the_thread->Priority_node );
+ _Thread_Evaluate_priority( mutex->holder );
+
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {