From 0c551f76e5432941d535bf8cf4ed5b6809e5f13e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 8 Aug 2013 08:45:33 +0200 Subject: score: Add _Scheduler_priority_Get_scheduler_info Add and use _Scheduler_priority_Get_scheduler_info(). --- cpukit/score/src/schedulerpriorityyield.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'cpukit/score/src/schedulerpriorityyield.c') 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 ) ) -- cgit v1.2.3