From 27783f6ca8683eaf4826e777963c32a63f55da31 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 10 Jul 2014 14:27:42 +0200 Subject: score: Fix scheduler helping implementation Do not extract the idle threads from the ready set so that there is always a thread available for comparison. --- cpukit/score/src/schedulersimplesmp.c | 38 +++++------------------------------ 1 file changed, 5 insertions(+), 33 deletions(-) (limited to 'cpukit/score/src/schedulersimplesmp.c') diff --git a/cpukit/score/src/schedulersimplesmp.c b/cpukit/score/src/schedulersimplesmp.c index 733f3dbe9f..0f05a7da81 100644 --- a/cpukit/score/src/schedulersimplesmp.c +++ b/cpukit/score/src/schedulersimplesmp.c @@ -165,28 +165,6 @@ static void _Scheduler_simple_SMP_Extract_from_ready( _Chain_Extract_unprotected( &node_to_extract->Node ); } -static Thread_Control *_Scheduler_simple_SMP_Get_idle_thread( - Scheduler_Context *context -) -{ - return _Scheduler_SMP_Get_idle_thread( - context, - _Scheduler_simple_SMP_Extract_from_ready - ); -} - -static void _Scheduler_simple_SMP_Release_idle_thread( - Scheduler_Context *context, - Thread_Control *idle -) -{ - _Scheduler_SMP_Release_idle_thread( - context, - idle, - _Scheduler_simple_SMP_Insert_ready_fifo - ); -} - void _Scheduler_simple_SMP_Block( const Scheduler_Control *scheduler, Thread_Control *thread @@ -200,8 +178,7 @@ void _Scheduler_simple_SMP_Block( _Scheduler_simple_SMP_Extract_from_ready, _Scheduler_simple_SMP_Get_highest_ready, _Scheduler_simple_SMP_Move_from_ready_to_scheduled, - _Scheduler_SMP_Allocate_processor_lazy, - _Scheduler_simple_SMP_Get_idle_thread + _Scheduler_SMP_Allocate_processor_lazy ); } @@ -223,8 +200,7 @@ static Thread_Control *_Scheduler_simple_SMP_Enqueue_ordered( insert_scheduled, _Scheduler_simple_SMP_Move_from_scheduled_to_ready, _Scheduler_SMP_Get_lowest_scheduled, - _Scheduler_SMP_Allocate_processor_lazy, - _Scheduler_simple_SMP_Release_idle_thread + _Scheduler_SMP_Allocate_processor_lazy ); } @@ -277,9 +253,7 @@ static Thread_Control *_Scheduler_simple_SMP_Enqueue_scheduled_ordered( insert_ready, insert_scheduled, _Scheduler_simple_SMP_Move_from_ready_to_scheduled, - _Scheduler_SMP_Allocate_processor_lazy, - _Scheduler_simple_SMP_Get_idle_thread, - _Scheduler_simple_SMP_Release_idle_thread + _Scheduler_SMP_Allocate_processor_lazy ); } @@ -321,8 +295,7 @@ Thread_Control *_Scheduler_simple_SMP_Unblock( return _Scheduler_SMP_Unblock( context, thread, - _Scheduler_simple_SMP_Enqueue_fifo, - _Scheduler_simple_SMP_Release_idle_thread + _Scheduler_simple_SMP_Enqueue_fifo ); } @@ -361,8 +334,7 @@ Thread_Control *_Scheduler_simple_SMP_Ask_for_help( context, offers_help, needs_help, - _Scheduler_simple_SMP_Enqueue_fifo, - _Scheduler_simple_SMP_Release_idle_thread + _Scheduler_simple_SMP_Enqueue_fifo ); } -- cgit v1.2.3