diff options
author | Gedare Bloom <gedare@rtems.org> | 2017-12-21 11:49:30 -0500 |
---|---|---|
committer | Gedare Bloom <gedare@rtems.org> | 2018-03-23 11:33:59 -0400 |
commit | 78b867e26dac3266763f275c1f438da912f33a6e (patch) | |
tree | 6a6bcac4a0a7f3fa6fd9ab7a9c499ca00ff69f2c /cpukit/score/include/rtems | |
parent | sptests: Add spmutex01 to build (diff) | |
download | rtems-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/include/rtems')
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index 214f8ce1f5..b0b40f713c 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -277,6 +277,17 @@ typedef struct { } Thread_Wait_information; /** + * @brief Encapsulates base and inherited priority. + */ +typedef struct Thread_Priority_node { + Chain_Node Node; + /** current priority = min(real_priority, min(Inherited_priorities)) */ + Priority_Control current_priority; + /** base priority irrespective of inheritance/ceiling */ + Priority_Control real_priority; +} Thread_Priority_node; + +/** * The following defines the control block used to manage * each thread proxy. * @@ -288,10 +299,9 @@ typedef struct { Objects_Control Object; /** This field is the current execution state of this proxy. */ States_Control current_state; - /** This field is the current priority state of this proxy. */ - Priority_Control current_priority; - /** This field is the base priority of this proxy. */ - Priority_Control real_priority; + /** This field encapsulates the base and current (inherited) priority + * of this proxy. */ + Thread_Priority_node Priority_node; /** This field is the number of mutexes currently held by this proxy. */ uint32_t resource_count; @@ -338,10 +348,9 @@ struct Thread_Control_struct { Objects_Control Object; /** This field is the current execution state of this thread. */ States_Control current_state; - /** This field is the current priority state of this thread. */ - Priority_Control current_priority; - /** This field is the base priority of this thread. */ - Priority_Control real_priority; + /** This field encapsulates the base and current (inherited) priority + * of this thread. */ + Thread_Priority_node Priority_node; /** This field is the number of mutexes currently held by this thread. */ uint32_t resource_count; /** This field is the blocking information for this thread. */ |