diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-03-17 16:24:44 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-03-20 08:49:33 +0100 |
commit | 6a941e3a9986d3cfb3e4ed0139e983b0455cc73b (patch) | |
tree | 9ad4114b0eea22a82ddc51274a1b6e550ff3f4dd /cpukit/score/include/rtems/score | |
parent | score: Delete unused _Timestamp_Is_valid() (diff) | |
download | rtems-6a941e3a9986d3cfb3e4ed0139e983b0455cc73b.tar.bz2 |
score: Fix _Thread_Change_priority()
Atomically update the current priority of a thread and the wait queue.
Serialize the scheduler update in a separate critical section with a
generation number.
New test sptests/spintrcritical23.
Close #2310.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index cea88f4ab7..11f60f324b 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -582,6 +582,15 @@ struct Thread_Control_struct { Priority_Control current_priority; /** This field is the base priority of this thread. */ Priority_Control real_priority; + + /** + * @brief Generation of the current priority value. + * + * It is used in _Thread_Change_priority() to serialize the update of + * priority related data structures. + */ + uint32_t priority_generation; + /** 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. */ |