From 900d337f960cb7cc53f5c93c29a503e5ced2c31f Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 5 May 2015 13:05:54 +0200 Subject: score: Rework _Thread_Change_priority() Move the writes to Thread_Control::current_priority and Thread_Control::real_priority into _Thread_Change_priority() under the protection of the thread lock. Add a filter function to _Thread_Change_priority() to enable specialized variants. Avoid race conditions during a thread priority restore with the new Thread_Control::priority_restore_hint for an important average case optimizations used by priority inheritance mutexes. Update #2273. --- cpukit/score/src/scheduleredfreleasejob.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpukit/score/src/scheduleredfreleasejob.c') diff --git a/cpukit/score/src/scheduleredfreleasejob.c b/cpukit/score/src/scheduleredfreleasejob.c index 6c1b642890..2c3db65b64 100644 --- a/cpukit/score/src/scheduleredfreleasejob.c +++ b/cpukit/score/src/scheduleredfreleasejob.c @@ -29,6 +29,7 @@ void _Scheduler_EDF_Release_job( ) { Priority_Control new_priority; + Priority_Control unused; (void) scheduler; @@ -42,6 +43,5 @@ void _Scheduler_EDF_Release_job( new_priority = the_thread->Start.initial_priority; } - the_thread->real_priority = new_priority; - _Thread_Change_priority(the_thread, new_priority, true); + _Thread_Set_priority( the_thread, new_priority, &unused, true ); } -- cgit v1.2.3