diff options
author | Gedare Bloom <gedare@rtems.org> | 2017-12-21 13:04:50 -0500 |
---|---|---|
committer | Gedare Bloom <gedare@rtems.org> | 2018-03-23 11:33:59 -0400 |
commit | b50468c6bff4e770aa038b9f87e514a2a1da906b (patch) | |
tree | 3313ec0f840e8ae24828dc33187adf71682d07b4 /cpukit/score/src/coremutexsurrender.c | |
parent | score: replace current and real priority with priority node (diff) | |
download | rtems-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/coremutexsurrender.c')
-rw-r--r-- | cpukit/score/src/coremutexsurrender.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cpukit/score/src/coremutexsurrender.c b/cpukit/score/src/coremutexsurrender.c index 2ed2afebb7..56d504531e 100644 --- a/cpukit/score/src/coremutexsurrender.c +++ b/cpukit/score/src/coremutexsurrender.c @@ -124,6 +124,9 @@ CORE_mutex_Status _CORE_mutex_Surrender( #endif holder->resource_count--; } + if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { + _Thread_Release_inherited_priority( the_mutex ); + } the_mutex->holder = NULL; the_mutex->holder_id = 0; @@ -132,8 +135,7 @@ CORE_mutex_Status _CORE_mutex_Surrender( * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ - if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || - _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { + if ( _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->Priority_node.current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); |