summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/coremutexsurrender.c
diff options
context:
space:
mode:
authorGedare Bloom <gedare@rtems.org>2017-12-21 11:49:30 -0500
committerGedare Bloom <gedare@rtems.org>2018-03-23 11:33:59 -0400
commit78b867e26dac3266763f275c1f438da912f33a6e (patch)
tree6a6bcac4a0a7f3fa6fd9ab7a9c499ca00ff69f2c /cpukit/score/src/coremutexsurrender.c
parent776caaed01153df5c67839005765fae07691eb3e (diff)
downloadrtems-78b867e26dac3266763f275c1f438da912f33a6e.tar.bz2
score: replace current and real priority with priority node
Encapsulate the current_priority and real_priority fields of the thread control block with a Thread_Priority_node struct. Propagate modifications throughout the tree where the two fields are directly accessed. Updates #3359.
Diffstat (limited to 'cpukit/score/src/coremutexsurrender.c')
-rw-r--r--cpukit/score/src/coremutexsurrender.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cpukit/score/src/coremutexsurrender.c b/cpukit/score/src/coremutexsurrender.c
index 4d215bb2d1..2ed2afebb7 100644
--- a/cpukit/score/src/coremutexsurrender.c
+++ b/cpukit/score/src/coremutexsurrender.c
@@ -135,12 +135,12 @@ CORE_mutex_Status _CORE_mutex_Surrender(
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
- if(the_mutex->queue.priority_before != holder->current_priority)
+ if(the_mutex->queue.priority_before != holder->Priority_node.current_priority)
_Thread_Change_priority(holder,the_mutex->queue.priority_before,true);
#endif
if ( holder->resource_count == 0 &&
- holder->real_priority != holder->current_priority ) {
- _Thread_Change_priority( holder, holder->real_priority, true );
+ holder->Priority_node.real_priority != holder->Priority_node.current_priority ) {
+ _Thread_Change_priority( holder, holder->Priority_node.real_priority, true );
}
}
@@ -174,18 +174,18 @@ CORE_mutex_Status _CORE_mutex_Surrender(
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
- the_mutex->queue.priority_before = the_thread->current_priority;
+ the_mutex->queue.priority_before = the_thread->Priority_node.current_priority;
#endif
the_thread->resource_count++;
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
- the_mutex->queue.priority_before = the_thread->current_priority;
+ the_mutex->queue.priority_before = the_thread->Priority_node.current_priority;
#endif
the_thread->resource_count++;
if (the_mutex->Attributes.priority_ceiling <
- the_thread->current_priority){
+ the_thread->Priority_node.current_priority){
_Thread_Change_priority(
the_thread,
the_mutex->Attributes.priority_ceiling,