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/schedulersimplesmp.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/schedulersimplesmp.c')
-rw-r--r-- | cpukit/score/src/schedulersimplesmp.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/cpukit/score/src/schedulersimplesmp.c b/cpukit/score/src/schedulersimplesmp.c index ed2d5d1b73..392d4ff78a 100644 --- a/cpukit/score/src/schedulersimplesmp.c +++ b/cpukit/score/src/schedulersimplesmp.c @@ -176,10 +176,9 @@ void _Scheduler_simple_SMP_Block( ); } -static Thread_Control *_Scheduler_simple_SMP_Enqueue_ordered( +static bool _Scheduler_simple_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 @@ -188,7 +187,6 @@ static Thread_Control *_Scheduler_simple_SMP_Enqueue_ordered( return _Scheduler_SMP_Enqueue_ordered( context, node, - needs_help, order, insert_ready, insert_scheduled, @@ -198,39 +196,35 @@ static Thread_Control *_Scheduler_simple_SMP_Enqueue_ordered( ); } -static Thread_Control *_Scheduler_simple_SMP_Enqueue_lifo( +static bool _Scheduler_simple_SMP_Enqueue_lifo( Scheduler_Context *context, - Scheduler_Node *node, - Thread_Control *needs_help + Scheduler_Node *node ) { return _Scheduler_simple_SMP_Enqueue_ordered( context, node, - needs_help, _Scheduler_SMP_Insert_priority_lifo_order, _Scheduler_simple_SMP_Insert_ready_lifo, _Scheduler_SMP_Insert_scheduled_lifo ); } -static Thread_Control *_Scheduler_simple_SMP_Enqueue_fifo( +static bool _Scheduler_simple_SMP_Enqueue_fifo( Scheduler_Context *context, - Scheduler_Node *node, - Thread_Control *needs_help + Scheduler_Node *node ) { return _Scheduler_simple_SMP_Enqueue_ordered( context, node, - needs_help, _Scheduler_SMP_Insert_priority_fifo_order, _Scheduler_simple_SMP_Insert_ready_fifo, _Scheduler_SMP_Insert_scheduled_fifo ); } -static Thread_Control *_Scheduler_simple_SMP_Enqueue_scheduled_ordered( +static bool _Scheduler_simple_SMP_Enqueue_scheduled_ordered( Scheduler_Context *context, Scheduler_Node *node, Chain_Node_order order, @@ -251,7 +245,7 @@ static Thread_Control *_Scheduler_simple_SMP_Enqueue_scheduled_ordered( ); } -static Thread_Control *_Scheduler_simple_SMP_Enqueue_scheduled_lifo( +static bool _Scheduler_simple_SMP_Enqueue_scheduled_lifo( Scheduler_Context *context, Scheduler_Node *node ) @@ -265,7 +259,7 @@ static Thread_Control *_Scheduler_simple_SMP_Enqueue_scheduled_lifo( ); } -static Thread_Control *_Scheduler_simple_SMP_Enqueue_scheduled_fifo( +static bool _Scheduler_simple_SMP_Enqueue_scheduled_fifo( Scheduler_Context *context, Scheduler_Node *node ) @@ -279,7 +273,7 @@ static Thread_Control *_Scheduler_simple_SMP_Enqueue_scheduled_fifo( ); } -Thread_Control *_Scheduler_simple_SMP_Unblock( +bool _Scheduler_simple_SMP_Unblock( const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node @@ -385,7 +379,7 @@ void _Scheduler_simple_SMP_Withdraw_node( ); } -Thread_Control *_Scheduler_simple_SMP_Yield( +bool _Scheduler_simple_SMP_Yield( const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node |