summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadchangepriority.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src/threadchangepriority.c')
-rw-r--r--cpukit/score/src/threadchangepriority.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/cpukit/score/src/threadchangepriority.c b/cpukit/score/src/threadchangepriority.c
index 6ee65f53cc..dea671de3f 100644
--- a/cpukit/score/src/threadchangepriority.c
+++ b/cpukit/score/src/threadchangepriority.c
@@ -38,16 +38,20 @@ void _Thread_Change_priority(
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority ) {
- uint32_t my_generation = the_thread->priority_generation + 1;
+ uint32_t my_generation = the_thread->Priority.generation + 1;
the_thread->current_priority = new_priority;
- the_thread->priority_generation = my_generation;
+ the_thread->Priority.generation = my_generation;
- _Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
+ (*the_thread->Priority.change_handler)(
+ the_thread,
+ new_priority,
+ the_thread->Priority.change_handler_context
+ );
_ISR_Flash( level );
- if ( the_thread->priority_generation == my_generation ) {
+ if ( the_thread->Priority.generation == my_generation ) {
if ( _States_Is_ready( the_thread->current_state ) ) {
_Scheduler_Change_priority(
the_thread,