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 | |
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')
-rw-r--r-- | cpukit/score/src/schedulerpriorityaffinitysmp.c | 19 | ||||
-rw-r--r-- | cpukit/score/src/schedulerprioritysmp.c | 16 | ||||
-rw-r--r-- | cpukit/score/src/schedulersimplesmp.c | 38 |
3 files changed, 16 insertions, 57 deletions
diff --git a/cpukit/score/src/schedulerpriorityaffinitysmp.c b/cpukit/score/src/schedulerpriorityaffinitysmp.c index 39a0a481ea..41e44a0834 100644 --- a/cpukit/score/src/schedulerpriorityaffinitysmp.c +++ b/cpukit/score/src/schedulerpriorityaffinitysmp.c @@ -231,8 +231,7 @@ void _Scheduler_priority_affinity_SMP_Block( _Scheduler_priority_SMP_Extract_from_ready, _Scheduler_priority_affinity_SMP_Get_highest_ready, _Scheduler_priority_SMP_Move_from_ready_to_scheduled, - _Scheduler_SMP_Allocate_processor_exact, - _Scheduler_priority_SMP_Get_idle_thread + _Scheduler_SMP_Allocate_processor_exact ); /* @@ -314,8 +313,7 @@ static Thread_Control *_Scheduler_priority_affinity_SMP_Enqueue_fifo( _Scheduler_SMP_Insert_scheduled_fifo, _Scheduler_priority_SMP_Move_from_scheduled_to_ready, _Scheduler_priority_affinity_SMP_Get_lowest_scheduled, - _Scheduler_SMP_Allocate_processor_exact, - _Scheduler_priority_SMP_Release_idle_thread + _Scheduler_SMP_Allocate_processor_exact ); } @@ -399,8 +397,7 @@ Thread_Control *_Scheduler_priority_affinity_SMP_Unblock( needs_help = _Scheduler_SMP_Unblock( context, thread, - _Scheduler_priority_affinity_SMP_Enqueue_fifo, - _Scheduler_priority_SMP_Release_idle_thread + _Scheduler_priority_affinity_SMP_Enqueue_fifo ); /* @@ -433,8 +430,7 @@ static Thread_Control *_Scheduler_priority_affinity_SMP_Enqueue_ordered( insert_scheduled, _Scheduler_priority_SMP_Move_from_scheduled_to_ready, _Scheduler_priority_affinity_SMP_Get_lowest_scheduled, - _Scheduler_SMP_Allocate_processor_exact, - _Scheduler_priority_SMP_Release_idle_thread + _Scheduler_SMP_Allocate_processor_exact ); } @@ -482,9 +478,7 @@ _Scheduler_priority_affinity_SMP_Enqueue_scheduled_ordered( insert_ready, insert_scheduled, _Scheduler_priority_SMP_Move_from_ready_to_scheduled, - _Scheduler_SMP_Allocate_processor_exact, - _Scheduler_priority_SMP_Get_idle_thread, - _Scheduler_priority_SMP_Release_idle_thread + _Scheduler_SMP_Allocate_processor_exact ); } @@ -572,8 +566,7 @@ Thread_Control *_Scheduler_priority_affinity_SMP_Ask_for_help( context, offers_help, needs_help, - _Scheduler_priority_affinity_SMP_Enqueue_fifo, - _Scheduler_priority_SMP_Release_idle_thread + _Scheduler_priority_affinity_SMP_Enqueue_fifo ); _Scheduler_priority_affinity_SMP_Check_for_migrations( context ); diff --git a/cpukit/score/src/schedulerprioritysmp.c b/cpukit/score/src/schedulerprioritysmp.c index 93d1c76d30..c08799f270 100644 --- a/cpukit/score/src/schedulerprioritysmp.c +++ b/cpukit/score/src/schedulerprioritysmp.c @@ -93,8 +93,7 @@ void _Scheduler_priority_SMP_Block( _Scheduler_priority_SMP_Extract_from_ready, _Scheduler_priority_SMP_Get_highest_ready, _Scheduler_priority_SMP_Move_from_ready_to_scheduled, - _Scheduler_SMP_Allocate_processor_lazy, - _Scheduler_priority_SMP_Get_idle_thread + _Scheduler_SMP_Allocate_processor_lazy ); } @@ -116,8 +115,7 @@ static Thread_Control *_Scheduler_priority_SMP_Enqueue_ordered( insert_scheduled, _Scheduler_priority_SMP_Move_from_scheduled_to_ready, _Scheduler_SMP_Get_lowest_scheduled, - _Scheduler_SMP_Allocate_processor_lazy, - _Scheduler_priority_SMP_Release_idle_thread + _Scheduler_SMP_Allocate_processor_lazy ); } @@ -170,9 +168,7 @@ static Thread_Control *_Scheduler_priority_SMP_Enqueue_scheduled_ordered( insert_ready, insert_scheduled, _Scheduler_priority_SMP_Move_from_ready_to_scheduled, - _Scheduler_SMP_Allocate_processor_lazy, - _Scheduler_priority_SMP_Get_idle_thread, - _Scheduler_priority_SMP_Release_idle_thread + _Scheduler_SMP_Allocate_processor_lazy ); } @@ -214,8 +210,7 @@ Thread_Control *_Scheduler_priority_SMP_Unblock( return _Scheduler_SMP_Unblock( context, thread, - _Scheduler_priority_SMP_Enqueue_fifo, - _Scheduler_priority_SMP_Release_idle_thread + _Scheduler_priority_SMP_Enqueue_fifo ); } @@ -254,8 +249,7 @@ Thread_Control *_Scheduler_priority_SMP_Ask_for_help( context, offers_help, needs_help, - _Scheduler_priority_SMP_Enqueue_fifo, - _Scheduler_priority_SMP_Release_idle_thread + _Scheduler_priority_SMP_Enqueue_fifo ); } 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 ); } |