summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-10-10 14:01:55 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-02 10:05:40 +0100
commit2df4abcee2fd762a9688bef13e152d5b81cc763e (patch)
tree840277642e69e77c326aec7a4ff6322591cb1467 /cpukit/score/src
parentscore: Pass scheduler node to update priority op (diff)
downloadrtems-2df4abcee2fd762a9688bef13e152d5b81cc763e.tar.bz2
score: Pass scheduler node to yield operation
Changed for consistency with other scheduler operations. Update #2556.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r--cpukit/score/src/scheduleredfyield.c11
-rw-r--r--cpukit/score/src/schedulerprioritysmp.c4
-rw-r--r--cpukit/score/src/schedulerpriorityyield.c10
-rw-r--r--cpukit/score/src/schedulersimplesmp.c4
-rw-r--r--cpukit/score/src/schedulersimpleyield.c5
-rw-r--r--cpukit/score/src/schedulerstrongapa.c4
6 files changed, 26 insertions, 12 deletions
diff --git a/cpukit/score/src/scheduleredfyield.c b/cpukit/score/src/scheduleredfyield.c
index 3e64e5ca05..a54b1f5c72 100644
--- a/cpukit/score/src/scheduleredfyield.c
+++ b/cpukit/score/src/scheduleredfyield.c
@@ -23,17 +23,18 @@
Scheduler_Void_or_thread _Scheduler_EDF_Yield(
const Scheduler_Control *scheduler,
- Thread_Control *the_thread
+ Thread_Control *the_thread,
+ Scheduler_Node *node
)
{
Scheduler_EDF_Context *context;
- Scheduler_EDF_Node *node;
+ Scheduler_EDF_Node *the_node;
context = _Scheduler_EDF_Get_context( scheduler );
- node = _Scheduler_EDF_Thread_get_node( the_thread );
+ the_node = _Scheduler_EDF_Node_downcast( node );
- _Scheduler_EDF_Extract( context, node );
- _Scheduler_EDF_Enqueue( context, node, node->priority );
+ _Scheduler_EDF_Extract( context, the_node );
+ _Scheduler_EDF_Enqueue( context, the_node, the_node->priority );
_Scheduler_EDF_Schedule_body( scheduler, the_thread, true );
SCHEDULER_RETURN_VOID_OR_NULL;
diff --git a/cpukit/score/src/schedulerprioritysmp.c b/cpukit/score/src/schedulerprioritysmp.c
index 4936b05fce..3c88161767 100644
--- a/cpukit/score/src/schedulerprioritysmp.c
+++ b/cpukit/score/src/schedulerprioritysmp.c
@@ -264,7 +264,8 @@ Thread_Control *_Scheduler_priority_SMP_Ask_for_help_X(
Thread_Control *_Scheduler_priority_SMP_Yield(
const Scheduler_Control *scheduler,
- Thread_Control *thread
+ Thread_Control *thread,
+ Scheduler_Node *node
)
{
Scheduler_Context *context = _Scheduler_Get_context( scheduler );
@@ -272,6 +273,7 @@ Thread_Control *_Scheduler_priority_SMP_Yield(
return _Scheduler_SMP_Yield(
context,
thread,
+ node,
_Scheduler_priority_SMP_Extract_from_ready,
_Scheduler_priority_SMP_Enqueue_fifo,
_Scheduler_priority_SMP_Enqueue_scheduled_fifo
diff --git a/cpukit/score/src/schedulerpriorityyield.c b/cpukit/score/src/schedulerpriorityyield.c
index 5dab094f46..4d22dc9b4d 100644
--- a/cpukit/score/src/schedulerpriorityyield.c
+++ b/cpukit/score/src/schedulerpriorityyield.c
@@ -23,11 +23,15 @@
Scheduler_Void_or_thread _Scheduler_priority_Yield(
const Scheduler_Control *scheduler,
- Thread_Control *the_thread
+ Thread_Control *the_thread,
+ Scheduler_Node *node
)
{
- Scheduler_priority_Node *node = _Scheduler_priority_Thread_get_node( the_thread );
- Chain_Control *ready_chain = node->Ready_queue.ready_chain;
+ Scheduler_priority_Node *the_node;
+ Chain_Control *ready_chain;
+
+ the_node = _Scheduler_priority_Node_downcast( node );
+ ready_chain = the_node->Ready_queue.ready_chain;
if ( !_Chain_Has_only_one_node( ready_chain ) ) {
_Chain_Extract_unprotected( &the_thread->Object.Node );
diff --git a/cpukit/score/src/schedulersimplesmp.c b/cpukit/score/src/schedulersimplesmp.c
index 2d333c9400..b476c08edb 100644
--- a/cpukit/score/src/schedulersimplesmp.c
+++ b/cpukit/score/src/schedulersimplesmp.c
@@ -331,7 +331,8 @@ Thread_Control *_Scheduler_simple_SMP_Ask_for_help_X(
Thread_Control *_Scheduler_simple_SMP_Yield(
const Scheduler_Control *scheduler,
- Thread_Control *thread
+ Thread_Control *thread,
+ Scheduler_Node *node
)
{
Scheduler_Context *context = _Scheduler_Get_context( scheduler );
@@ -339,6 +340,7 @@ Thread_Control *_Scheduler_simple_SMP_Yield(
return _Scheduler_SMP_Yield(
context,
thread,
+ node,
_Scheduler_simple_SMP_Extract_from_ready,
_Scheduler_simple_SMP_Enqueue_fifo,
_Scheduler_simple_SMP_Enqueue_scheduled_fifo
diff --git a/cpukit/score/src/schedulersimpleyield.c b/cpukit/score/src/schedulersimpleyield.c
index 66e4450477..cfd123fb8c 100644
--- a/cpukit/score/src/schedulersimpleyield.c
+++ b/cpukit/score/src/schedulersimpleyield.c
@@ -22,12 +22,15 @@
Scheduler_Void_or_thread _Scheduler_simple_Yield(
const Scheduler_Control *scheduler,
- Thread_Control *the_thread
+ Thread_Control *the_thread,
+ Scheduler_Node *node
)
{
Scheduler_simple_Context *context =
_Scheduler_simple_Get_context( scheduler );
+ (void) node;
+
_Chain_Extract_unprotected( &the_thread->Object.Node );
_Scheduler_simple_Insert_priority_fifo( &context->Ready, the_thread );
_Scheduler_simple_Schedule_body( scheduler, the_thread, false );
diff --git a/cpukit/score/src/schedulerstrongapa.c b/cpukit/score/src/schedulerstrongapa.c
index f42f470cfc..2b2f4e4839 100644
--- a/cpukit/score/src/schedulerstrongapa.c
+++ b/cpukit/score/src/schedulerstrongapa.c
@@ -390,7 +390,8 @@ Thread_Control *_Scheduler_strong_APA_Ask_for_help_X(
Thread_Control *_Scheduler_strong_APA_Yield(
const Scheduler_Control *scheduler,
- Thread_Control *the_thread
+ Thread_Control *the_thread,
+ Scheduler_Node *node
)
{
Scheduler_Context *context = _Scheduler_Get_context( scheduler );
@@ -398,6 +399,7 @@ Thread_Control *_Scheduler_strong_APA_Yield(
return _Scheduler_SMP_Yield(
context,
the_thread,
+ node,
_Scheduler_strong_APA_Extract_from_ready,
_Scheduler_strong_APA_Enqueue_fifo,
_Scheduler_strong_APA_Enqueue_scheduled_fifo