summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/schedulerpriorityyield.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-08-08 08:45:33 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-08-20 10:14:02 +0200
commit0c551f76e5432941d535bf8cf4ed5b6809e5f13e (patch)
treeef1d5662a8d93911492c021a320995417daf183f /cpukit/score/src/schedulerpriorityyield.c
parentscore: PR2136: Fix _Thread_Change_priority() (diff)
downloadrtems-0c551f76e5432941d535bf8cf4ed5b6809e5f13e.tar.bz2
score: Add _Scheduler_priority_Get_scheduler_info
Add and use _Scheduler_priority_Get_scheduler_info().
Diffstat (limited to 'cpukit/score/src/schedulerpriorityyield.c')
-rw-r--r--cpukit/score/src/schedulerpriorityyield.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/cpukit/score/src/schedulerpriorityyield.c b/cpukit/score/src/schedulerpriorityyield.c
index fa9a1f1271..9fdf719878 100644
--- a/cpukit/score/src/schedulerpriorityyield.c
+++ b/cpukit/score/src/schedulerpriorityyield.c
@@ -24,21 +24,20 @@
void _Scheduler_priority_Yield( Thread_Control *thread )
{
- Scheduler_priority_Per_thread *sched_info;
- ISR_Level level;
- Chain_Control *ready;
+ Scheduler_priority_Per_thread *sched_info_of_thread =
+ _Scheduler_priority_Get_scheduler_info( thread );
+ Chain_Control *ready_chain = sched_info_of_thread->ready_chain;
+ ISR_Level level;
- sched_info = (Scheduler_priority_Per_thread *) thread->scheduler_info;
- ready = sched_info->ready_chain;
_ISR_Disable( level );
- if ( !_Chain_Has_only_one_node( ready ) ) {
+ if ( !_Chain_Has_only_one_node( ready_chain ) ) {
_Chain_Extract_unprotected( &thread->Object.Node );
- _Chain_Append_unprotected( ready, &thread->Object.Node );
+ _Chain_Append_unprotected( ready_chain, &thread->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( thread ) )
- _Thread_Heir = (Thread_Control *) _Chain_First( ready );
+ _Thread_Heir = (Thread_Control *) _Chain_First( ready_chain );
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( thread ) )