diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-03 15:03:35 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-04 11:01:18 +0200 |
commit | 24934e36e2513f972510d7c746103be1f766dc6a (patch) | |
tree | 66e3c8840cec6c1262f142e25ec545926140dbf9 /cpukit/score/src/threadchangepriority.c | |
parent | score: Add and use Scheduler_simple_Control (diff) | |
download | rtems-24934e36e2513f972510d7c746103be1f766dc6a.tar.bz2 |
score: Add scheduler control to scheduler ops
Scheduler operations must be free of a global scheduler context to
enable partitioned/clustered scheduling.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/src/threadchangepriority.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cpukit/score/src/threadchangepriority.c b/cpukit/score/src/threadchangepriority.c index f60527a605..fab0c9e850 100644 --- a/cpukit/score/src/threadchangepriority.c +++ b/cpukit/score/src/threadchangepriority.c @@ -29,8 +29,9 @@ void _Thread_Change_priority( bool prepend_it ) { - ISR_Level level; - States_Control state, original_state; + Scheduler_Control *scheduler = _Scheduler_Get( the_thread ); + ISR_Level level; + States_Control state, original_state; /* * Save original state @@ -69,7 +70,7 @@ void _Thread_Change_priority( * result in a _Scheduler_Block() operation. Make sure we select an heir * now. */ - _Scheduler_Schedule( the_thread ); + _Scheduler_Schedule( scheduler, the_thread ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { @@ -89,9 +90,9 @@ void _Thread_Change_priority( the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); if ( prepend_it ) - _Scheduler_Enqueue_first( the_thread ); + _Scheduler_Enqueue_first( scheduler, the_thread ); else - _Scheduler_Enqueue( the_thread ); + _Scheduler_Enqueue( scheduler, the_thread ); } _ISR_Flash( level ); @@ -100,7 +101,7 @@ void _Thread_Change_priority( * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ - _Scheduler_Schedule( the_thread ); + _Scheduler_Schedule( scheduler, the_thread ); _ISR_Enable( level ); } |