diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-10-31 09:13:35 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-02 10:05:45 +0100 |
commit | 63e2ca1b8b0a651a733d4ac3e0517397d0681214 (patch) | |
tree | 327686940bb25d42f42c83d4b73b8890f7e52ad6 /cpukit/score/src/schedulerprioritysmp.c | |
parent | score: Introduce Thread_Scheduler_control::home (diff) | |
download | rtems-63e2ca1b8b0a651a733d4ac3e0517397d0681214.tar.bz2 |
score: Simplify yield and unblock scheduler ops
Update #2556.
Diffstat (limited to 'cpukit/score/src/schedulerprioritysmp.c')
-rw-r--r-- | cpukit/score/src/schedulerprioritysmp.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/cpukit/score/src/schedulerprioritysmp.c b/cpukit/score/src/schedulerprioritysmp.c index fac2b6da7e..79b3d597a8 100644 --- a/cpukit/score/src/schedulerprioritysmp.c +++ b/cpukit/score/src/schedulerprioritysmp.c @@ -109,10 +109,9 @@ void _Scheduler_priority_SMP_Block( ); } -static Thread_Control *_Scheduler_priority_SMP_Enqueue_ordered( +static bool _Scheduler_priority_SMP_Enqueue_ordered( Scheduler_Context *context, Scheduler_Node *node, - Thread_Control *needs_help, Chain_Node_order order, Scheduler_SMP_Insert insert_ready, Scheduler_SMP_Insert insert_scheduled @@ -121,7 +120,6 @@ static Thread_Control *_Scheduler_priority_SMP_Enqueue_ordered( return _Scheduler_SMP_Enqueue_ordered( context, node, - needs_help, order, insert_ready, insert_scheduled, @@ -131,39 +129,35 @@ static Thread_Control *_Scheduler_priority_SMP_Enqueue_ordered( ); } -static Thread_Control *_Scheduler_priority_SMP_Enqueue_lifo( +static bool _Scheduler_priority_SMP_Enqueue_lifo( Scheduler_Context *context, - Scheduler_Node *node, - Thread_Control *needs_help + Scheduler_Node *node ) { return _Scheduler_priority_SMP_Enqueue_ordered( context, node, - needs_help, _Scheduler_SMP_Insert_priority_lifo_order, _Scheduler_priority_SMP_Insert_ready_lifo, _Scheduler_SMP_Insert_scheduled_lifo ); } -static Thread_Control *_Scheduler_priority_SMP_Enqueue_fifo( +static bool _Scheduler_priority_SMP_Enqueue_fifo( Scheduler_Context *context, - Scheduler_Node *node, - Thread_Control *needs_help + Scheduler_Node *node ) { return _Scheduler_priority_SMP_Enqueue_ordered( context, node, - needs_help, _Scheduler_SMP_Insert_priority_fifo_order, _Scheduler_priority_SMP_Insert_ready_fifo, _Scheduler_SMP_Insert_scheduled_fifo ); } -static Thread_Control *_Scheduler_priority_SMP_Enqueue_scheduled_ordered( +static bool _Scheduler_priority_SMP_Enqueue_scheduled_ordered( Scheduler_Context *context, Scheduler_Node *node, Chain_Node_order order, @@ -184,7 +178,7 @@ static Thread_Control *_Scheduler_priority_SMP_Enqueue_scheduled_ordered( ); } -static Thread_Control *_Scheduler_priority_SMP_Enqueue_scheduled_lifo( +static bool _Scheduler_priority_SMP_Enqueue_scheduled_lifo( Scheduler_Context *context, Scheduler_Node *node ) @@ -198,7 +192,7 @@ static Thread_Control *_Scheduler_priority_SMP_Enqueue_scheduled_lifo( ); } -static Thread_Control *_Scheduler_priority_SMP_Enqueue_scheduled_fifo( +static bool _Scheduler_priority_SMP_Enqueue_scheduled_fifo( Scheduler_Context *context, Scheduler_Node *node ) @@ -212,7 +206,7 @@ static Thread_Control *_Scheduler_priority_SMP_Enqueue_scheduled_fifo( ); } -Thread_Control *_Scheduler_priority_SMP_Unblock( +bool _Scheduler_priority_SMP_Unblock( const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node @@ -318,7 +312,7 @@ void _Scheduler_priority_SMP_Withdraw_node( ); } -Thread_Control *_Scheduler_priority_SMP_Yield( +bool _Scheduler_priority_SMP_Yield( const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node |