diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-07-10 14:27:42 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-07-10 15:29:57 +0200 |
commit | 27783f6ca8683eaf4826e777963c32a63f55da31 (patch) | |
tree | 45a3294eb7cfd6bae51e1cb1661f699b0e23d6e8 /cpukit/score/src/schedulersimplesmp.c | |
parent | score: Fix assertions (diff) | |
download | rtems-27783f6ca8683eaf4826e777963c32a63f55da31.tar.bz2 |
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.
Diffstat (limited to 'cpukit/score/src/schedulersimplesmp.c')
-rw-r--r-- | cpukit/score/src/schedulersimplesmp.c | 38 |
1 files changed, 5 insertions, 33 deletions
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 ); } |