summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-06-11 14:31:03 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-07-08 16:30:48 +0200
commit8568341d69d16609a3dcf71716a89839b16ac881 (patch)
tree900c88db84557962dda75671eedd39911e1f2dc5 /cpukit/score/src
parentscore: Add _Scheduler_Help() (diff)
downloadrtems-8568341d69d16609a3dcf71716a89839b16ac881.tar.bz2
score: Need for help indicator for scheduler ops
Return a thread in need for help for the following scheduler operations - unblock, - change priority, and - yield. A thread in need for help is a thread that encounters a scheduler state change from scheduled to ready or a thread that cannot be scheduled in an unblock operation. Such a thread can ask threads which depend on resources owned by this thread for help.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r--cpukit/score/src/schedulercbsunblock.c4
-rw-r--r--cpukit/score/src/scheduleredfchangepriority.c4
-rw-r--r--cpukit/score/src/scheduleredfunblock.c4
-rw-r--r--cpukit/score/src/scheduleredfyield.c4
-rw-r--r--cpukit/score/src/schedulerpriorityaffinitysmp.c49
-rw-r--r--cpukit/score/src/schedulerprioritychangepriority.c4
-rw-r--r--cpukit/score/src/schedulerprioritysmp.c54
-rw-r--r--cpukit/score/src/schedulerpriorityunblock.c4
-rw-r--r--cpukit/score/src/schedulerpriorityyield.c4
-rw-r--r--cpukit/score/src/schedulersimplechangepriority.c4
-rw-r--r--cpukit/score/src/schedulersimplesmp.c54
-rw-r--r--cpukit/score/src/schedulersimpleunblock.c4
-rw-r--r--cpukit/score/src/schedulersimpleyield.c4
13 files changed, 121 insertions, 76 deletions
diff --git a/cpukit/score/src/schedulercbsunblock.c b/cpukit/score/src/schedulercbsunblock.c
index 5822af2934..688253c279 100644
--- a/cpukit/score/src/schedulercbsunblock.c
+++ b/cpukit/score/src/schedulercbsunblock.c
@@ -25,7 +25,7 @@
#include <rtems/score/threadimpl.h>
#include <rtems/score/watchdogimpl.h>
-void _Scheduler_CBS_Unblock(
+Scheduler_Void_or_thread _Scheduler_CBS_Unblock(
const Scheduler_Control *scheduler,
Thread_Control *the_thread
)
@@ -84,4 +84,6 @@ void _Scheduler_CBS_Unblock(
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
+
+ SCHEDULER_RETURN_VOID_OR_NULL;
}
diff --git a/cpukit/score/src/scheduleredfchangepriority.c b/cpukit/score/src/scheduleredfchangepriority.c
index 1422fb174e..32b0993d8f 100644
--- a/cpukit/score/src/scheduleredfchangepriority.c
+++ b/cpukit/score/src/scheduleredfchangepriority.c
@@ -20,7 +20,7 @@
#include <rtems/score/scheduleredfimpl.h>
-void _Scheduler_EDF_Change_priority(
+Scheduler_Void_or_thread _Scheduler_EDF_Change_priority(
const Scheduler_Control *scheduler,
Thread_Control *the_thread,
Priority_Control new_priority,
@@ -33,4 +33,6 @@ void _Scheduler_EDF_Change_priority(
_RBTree_Extract( &context->Ready, &node->Node );
_RBTree_Insert( &context->Ready, &node->Node );
+
+ SCHEDULER_RETURN_VOID_OR_NULL;
}
diff --git a/cpukit/score/src/scheduleredfunblock.c b/cpukit/score/src/scheduleredfunblock.c
index 30fa4f0163..469655e9d2 100644
--- a/cpukit/score/src/scheduleredfunblock.c
+++ b/cpukit/score/src/scheduleredfunblock.c
@@ -22,7 +22,7 @@
#include <rtems/score/schedulerimpl.h>
#include <rtems/score/thread.h>
-void _Scheduler_EDF_Unblock(
+Scheduler_Void_or_thread _Scheduler_EDF_Unblock(
const Scheduler_Control *scheduler,
Thread_Control *the_thread
)
@@ -51,4 +51,6 @@ void _Scheduler_EDF_Unblock(
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
+
+ SCHEDULER_RETURN_VOID_OR_NULL;
}
diff --git a/cpukit/score/src/scheduleredfyield.c b/cpukit/score/src/scheduleredfyield.c
index 0990ac0b14..5aa2afd8db 100644
--- a/cpukit/score/src/scheduleredfyield.c
+++ b/cpukit/score/src/scheduleredfyield.c
@@ -21,7 +21,7 @@
#include <rtems/score/scheduleredfimpl.h>
-void _Scheduler_EDF_Yield(
+Scheduler_Void_or_thread _Scheduler_EDF_Yield(
const Scheduler_Control *scheduler,
Thread_Control *the_thread
)
@@ -38,4 +38,6 @@ void _Scheduler_EDF_Yield(
_RBTree_Insert( &context->Ready, &node->Node );
_Scheduler_EDF_Schedule_body( scheduler, the_thread, false );
+
+ SCHEDULER_RETURN_VOID_OR_NULL;
}
diff --git a/cpukit/score/src/schedulerpriorityaffinitysmp.c b/cpukit/score/src/schedulerpriorityaffinitysmp.c
index e6a662e361..14a022e5d7 100644
--- a/cpukit/score/src/schedulerpriorityaffinitysmp.c
+++ b/cpukit/score/src/schedulerpriorityaffinitysmp.c
@@ -288,14 +288,16 @@ static Scheduler_Node * _Scheduler_priority_affinity_SMP_Get_lowest_scheduled(
* _Scheduler_priority_affinity_SMP_Get_lowest_scheduled into
* _Scheduler_SMP_Enqueue_ordered.
*/
-static void _Scheduler_priority_affinity_SMP_Enqueue_fifo(
+static Thread_Control *_Scheduler_priority_affinity_SMP_Enqueue_fifo(
Scheduler_Context *context,
- Scheduler_Node *node
+ Scheduler_Node *node,
+ Thread_Control *needs_help
)
{
- _Scheduler_SMP_Enqueue_ordered(
+ return _Scheduler_SMP_Enqueue_ordered(
context,
node,
+ needs_help,
_Scheduler_priority_affinity_SMP_Insert_priority_fifo_order,
_Scheduler_priority_SMP_Insert_ready_fifo,
_Scheduler_SMP_Insert_scheduled_fifo,
@@ -374,14 +376,15 @@ static void _Scheduler_priority_affinity_SMP_Check_for_migrations(
/*
* This is the public scheduler specific Unblock operation.
*/
-void _Scheduler_priority_affinity_SMP_Unblock(
+Thread_Control *_Scheduler_priority_affinity_SMP_Unblock(
const Scheduler_Control *scheduler,
Thread_Control *thread
)
{
Scheduler_Context *context = _Scheduler_Get_context( scheduler );
+ Thread_Control *needs_help;
- _Scheduler_SMP_Unblock(
+ needs_help = _Scheduler_SMP_Unblock(
context,
thread,
_Scheduler_priority_affinity_SMP_Enqueue_fifo
@@ -391,23 +394,27 @@ void _Scheduler_priority_affinity_SMP_Unblock(
* Perform any thread migrations that are needed due to these changes.
*/
_Scheduler_priority_affinity_SMP_Check_for_migrations( context );
+
+ return needs_help;
}
/*
* This is unique to this scheduler because it passes scheduler specific
* get_lowest_scheduled helper to _Scheduler_SMP_Enqueue_ordered.
*/
-static void _Scheduler_priority_affinity_SMP_Enqueue_ordered(
+static Thread_Control *_Scheduler_priority_affinity_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
)
{
- _Scheduler_SMP_Enqueue_ordered(
+ return _Scheduler_SMP_Enqueue_ordered(
context,
node,
+ needs_help,
order,
insert_ready,
insert_scheduled,
@@ -422,14 +429,16 @@ static void _Scheduler_priority_affinity_SMP_Enqueue_ordered(
* to _Scheduler_priority_affinity_SMP_Enqueue_ordered() which
* invokes a scheduler unique get_lowest_scheduled helper.
*/
-static void _Scheduler_priority_affinity_SMP_Enqueue_lifo(
+static Thread_Control *_Scheduler_priority_affinity_SMP_Enqueue_lifo(
Scheduler_Context *context,
- Scheduler_Node *node
+ Scheduler_Node *node,
+ Thread_Control *needs_help
)
{
- _Scheduler_priority_affinity_SMP_Enqueue_ordered(
+ return _Scheduler_priority_affinity_SMP_Enqueue_ordered(
context,
node,
+ needs_help,
_Scheduler_priority_affinity_SMP_Insert_priority_lifo_order,
_Scheduler_priority_SMP_Insert_ready_lifo,
_Scheduler_SMP_Insert_scheduled_lifo
@@ -441,7 +450,8 @@ static void _Scheduler_priority_affinity_SMP_Enqueue_lifo(
* invoke _Scheduler_SMP_Enqueue_scheduled_ordered() with
* this scheduler's get_highest_ready() helper.
*/
-static void _Scheduler_priority_affinity_SMP_Enqueue_scheduled_ordered(
+static Thread_Control *
+_Scheduler_priority_affinity_SMP_Enqueue_scheduled_ordered(
Scheduler_Context *context,
Scheduler_Node *node,
Chain_Node_order order,
@@ -449,7 +459,7 @@ static void _Scheduler_priority_affinity_SMP_Enqueue_scheduled_ordered(
Scheduler_SMP_Insert insert_scheduled
)
{
- _Scheduler_SMP_Enqueue_scheduled_ordered(
+ return _Scheduler_SMP_Enqueue_scheduled_ordered(
context,
node,
order,
@@ -466,12 +476,12 @@ static void _Scheduler_priority_affinity_SMP_Enqueue_scheduled_ordered(
* to _Scheduler_priority_affinity_SMP_Enqueue_scheduled__ordered() which
* invokes a scheduler unique get_lowest_scheduled helper.
*/
-static void _Scheduler_priority_affinity_SMP_Enqueue_scheduled_lifo(
+static Thread_Control *_Scheduler_priority_affinity_SMP_Enqueue_scheduled_lifo(
Scheduler_Context *context,
Scheduler_Node *node
)
{
- _Scheduler_priority_affinity_SMP_Enqueue_scheduled_ordered(
+ return _Scheduler_priority_affinity_SMP_Enqueue_scheduled_ordered(
context,
node,
_Scheduler_SMP_Insert_priority_lifo_order,
@@ -485,12 +495,12 @@ static void _Scheduler_priority_affinity_SMP_Enqueue_scheduled_lifo(
* to _Scheduler_priority_affinity_SMP_Enqueue_scheduled__ordered() which
* invokes a scheduler unique get_lowest_scheduled helper.
*/
-static void _Scheduler_priority_affinity_SMP_Enqueue_scheduled_fifo(
+static Thread_Control *_Scheduler_priority_affinity_SMP_Enqueue_scheduled_fifo(
Scheduler_Context *context,
Scheduler_Node *node
)
{
- _Scheduler_priority_affinity_SMP_Enqueue_scheduled_ordered(
+ return _Scheduler_priority_affinity_SMP_Enqueue_scheduled_ordered(
context,
node,
_Scheduler_SMP_Insert_priority_fifo_order,
@@ -502,7 +512,7 @@ static void _Scheduler_priority_affinity_SMP_Enqueue_scheduled_fifo(
/*
* This is the public scheduler specific Change Priority operation.
*/
-void _Scheduler_priority_affinity_SMP_Change_priority(
+Thread_Control *_Scheduler_priority_affinity_SMP_Change_priority(
const Scheduler_Control *scheduler,
Thread_Control *thread,
Priority_Control new_priority,
@@ -510,8 +520,9 @@ void _Scheduler_priority_affinity_SMP_Change_priority(
)
{
Scheduler_Context *context = _Scheduler_Get_context( scheduler );
+ Thread_Control *displaced;
- _Scheduler_SMP_Change_priority(
+ displaced = _Scheduler_SMP_Change_priority(
context,
thread,
new_priority,
@@ -528,6 +539,8 @@ void _Scheduler_priority_affinity_SMP_Change_priority(
* Perform any thread migrations that are needed due to these changes.
*/
_Scheduler_priority_affinity_SMP_Check_for_migrations( context );
+
+ return displaced;
}
/*
diff --git a/cpukit/score/src/schedulerprioritychangepriority.c b/cpukit/score/src/schedulerprioritychangepriority.c
index 4f00af6ad6..06c5f0f7c6 100644
--- a/cpukit/score/src/schedulerprioritychangepriority.c
+++ b/cpukit/score/src/schedulerprioritychangepriority.c
@@ -21,7 +21,7 @@
#include <rtems/score/schedulerpriorityimpl.h>
-void _Scheduler_priority_Change_priority(
+Scheduler_Void_or_thread _Scheduler_priority_Change_priority(
const Scheduler_Control *scheduler,
Thread_Control *the_thread,
Priority_Control new_priority,
@@ -58,4 +58,6 @@ void _Scheduler_priority_Change_priority(
&context->Bit_map
);
}
+
+ SCHEDULER_RETURN_VOID_OR_NULL;
}
diff --git a/cpukit/score/src/schedulerprioritysmp.c b/cpukit/score/src/schedulerprioritysmp.c
index 1f6d608538..b642c5d6f3 100644
--- a/cpukit/score/src/schedulerprioritysmp.c
+++ b/cpukit/score/src/schedulerprioritysmp.c
@@ -97,17 +97,19 @@ void _Scheduler_priority_SMP_Block(
);
}
-static void _Scheduler_priority_SMP_Enqueue_ordered(
- Scheduler_Context *context,
- Scheduler_Node *node,
- Chain_Node_order order,
- Scheduler_SMP_Insert insert_ready,
- Scheduler_SMP_Insert insert_scheduled
+static Thread_Control *_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
)
{
- _Scheduler_SMP_Enqueue_ordered(
+ return _Scheduler_SMP_Enqueue_ordered(
context,
node,
+ needs_help,
order,
insert_ready,
insert_scheduled,
@@ -117,35 +119,39 @@ static void _Scheduler_priority_SMP_Enqueue_ordered(
);
}
-static void _Scheduler_priority_SMP_Enqueue_lifo(
+static Thread_Control *_Scheduler_priority_SMP_Enqueue_lifo(
Scheduler_Context *context,
- Scheduler_Node *node
+ Scheduler_Node *node,
+ Thread_Control *needs_help
)
{
- _Scheduler_priority_SMP_Enqueue_ordered(
+ 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 void _Scheduler_priority_SMP_Enqueue_fifo(
+static Thread_Control *_Scheduler_priority_SMP_Enqueue_fifo(
Scheduler_Context *context,
- Scheduler_Node *node
+ Scheduler_Node *node,
+ Thread_Control *needs_help
)
{
- _Scheduler_priority_SMP_Enqueue_ordered(
+ 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 void _Scheduler_priority_SMP_Enqueue_scheduled_ordered(
+static Thread_Control *_Scheduler_priority_SMP_Enqueue_scheduled_ordered(
Scheduler_Context *context,
Scheduler_Node *node,
Chain_Node_order order,
@@ -153,7 +159,7 @@ static void _Scheduler_priority_SMP_Enqueue_scheduled_ordered(
Scheduler_SMP_Insert insert_scheduled
)
{
- _Scheduler_SMP_Enqueue_scheduled_ordered(
+ return _Scheduler_SMP_Enqueue_scheduled_ordered(
context,
node,
order,
@@ -165,12 +171,12 @@ static void _Scheduler_priority_SMP_Enqueue_scheduled_ordered(
);
}
-static void _Scheduler_priority_SMP_Enqueue_scheduled_lifo(
+static Thread_Control *_Scheduler_priority_SMP_Enqueue_scheduled_lifo(
Scheduler_Context *context,
Scheduler_Node *node
)
{
- _Scheduler_priority_SMP_Enqueue_scheduled_ordered(
+ return _Scheduler_priority_SMP_Enqueue_scheduled_ordered(
context,
node,
_Scheduler_SMP_Insert_priority_lifo_order,
@@ -179,12 +185,12 @@ static void _Scheduler_priority_SMP_Enqueue_scheduled_lifo(
);
}
-static void _Scheduler_priority_SMP_Enqueue_scheduled_fifo(
+static Thread_Control *_Scheduler_priority_SMP_Enqueue_scheduled_fifo(
Scheduler_Context *context,
Scheduler_Node *node
)
{
- _Scheduler_priority_SMP_Enqueue_scheduled_ordered(
+ return _Scheduler_priority_SMP_Enqueue_scheduled_ordered(
context,
node,
_Scheduler_SMP_Insert_priority_fifo_order,
@@ -193,21 +199,21 @@ static void _Scheduler_priority_SMP_Enqueue_scheduled_fifo(
);
}
-void _Scheduler_priority_SMP_Unblock(
+Thread_Control *_Scheduler_priority_SMP_Unblock(
const Scheduler_Control *scheduler,
Thread_Control *thread
)
{
Scheduler_Context *context = _Scheduler_Get_context( scheduler );
- _Scheduler_SMP_Unblock(
+ return _Scheduler_SMP_Unblock(
context,
thread,
_Scheduler_priority_SMP_Enqueue_fifo
);
}
-void _Scheduler_priority_SMP_Change_priority(
+Thread_Control *_Scheduler_priority_SMP_Change_priority(
const Scheduler_Control *scheduler,
Thread_Control *thread,
Priority_Control new_priority,
@@ -216,7 +222,7 @@ void _Scheduler_priority_SMP_Change_priority(
{
Scheduler_Context *context = _Scheduler_Get_context( scheduler );
- _Scheduler_SMP_Change_priority(
+ return _Scheduler_SMP_Change_priority(
context,
thread,
new_priority,
@@ -230,7 +236,7 @@ void _Scheduler_priority_SMP_Change_priority(
);
}
-void _Scheduler_priority_SMP_Yield(
+Thread_Control *_Scheduler_priority_SMP_Yield(
const Scheduler_Control *scheduler,
Thread_Control *thread
)
diff --git a/cpukit/score/src/schedulerpriorityunblock.c b/cpukit/score/src/schedulerpriorityunblock.c
index c1f12f44c6..06d29f3b91 100644
--- a/cpukit/score/src/schedulerpriorityunblock.c
+++ b/cpukit/score/src/schedulerpriorityunblock.c
@@ -22,7 +22,7 @@
#include <rtems/score/schedulerpriorityimpl.h>
-void _Scheduler_priority_Unblock (
+Scheduler_Void_or_thread _Scheduler_priority_Unblock (
const Scheduler_Control *scheduler,
Thread_Control *the_thread
)
@@ -57,4 +57,6 @@ void _Scheduler_priority_Unblock (
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
+
+ SCHEDULER_RETURN_VOID_OR_NULL;
}
diff --git a/cpukit/score/src/schedulerpriorityyield.c b/cpukit/score/src/schedulerpriorityyield.c
index de4b842513..2ee2d03057 100644
--- a/cpukit/score/src/schedulerpriorityyield.c
+++ b/cpukit/score/src/schedulerpriorityyield.c
@@ -21,7 +21,7 @@
#include <rtems/score/schedulerpriorityimpl.h>
#include <rtems/score/threadimpl.h>
-void _Scheduler_priority_Yield(
+Scheduler_Void_or_thread _Scheduler_priority_Yield(
const Scheduler_Control *scheduler,
Thread_Control *the_thread
)
@@ -43,4 +43,6 @@ void _Scheduler_priority_Yield(
} else if ( !_Thread_Is_heir( the_thread ) ) {
_Thread_Dispatch_necessary = true;
}
+
+ SCHEDULER_RETURN_VOID_OR_NULL;
}
diff --git a/cpukit/score/src/schedulersimplechangepriority.c b/cpukit/score/src/schedulersimplechangepriority.c
index 010f1dfc79..b8638ad28c 100644
--- a/cpukit/score/src/schedulersimplechangepriority.c
+++ b/cpukit/score/src/schedulersimplechangepriority.c
@@ -21,7 +21,7 @@
#include <rtems/score/schedulersimpleimpl.h>
-void _Scheduler_simple_Change_priority(
+Scheduler_Void_or_thread _Scheduler_simple_Change_priority(
const Scheduler_Control *scheduler,
Thread_Control *the_thread,
Priority_Control new_priority,
@@ -38,4 +38,6 @@ void _Scheduler_simple_Change_priority(
} else {
_Scheduler_simple_Insert_priority_fifo( &context->Ready, the_thread );
}
+
+ SCHEDULER_RETURN_VOID_OR_NULL;
}
diff --git a/cpukit/score/src/schedulersimplesmp.c b/cpukit/score/src/schedulersimplesmp.c
index 7361678e53..ee540bebd0 100644
--- a/cpukit/score/src/schedulersimplesmp.c
+++ b/cpukit/score/src/schedulersimplesmp.c
@@ -179,17 +179,19 @@ void _Scheduler_simple_SMP_Block(
);
}
-static void _Scheduler_simple_SMP_Enqueue_ordered(
- Scheduler_Context *context,
- Scheduler_Node *node,
- Chain_Node_order order,
- Scheduler_SMP_Insert insert_ready,
- Scheduler_SMP_Insert insert_scheduled
+static Thread_Control *_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
)
{
- _Scheduler_SMP_Enqueue_ordered(
+ return _Scheduler_SMP_Enqueue_ordered(
context,
node,
+ needs_help,
order,
insert_ready,
insert_scheduled,
@@ -199,35 +201,39 @@ static void _Scheduler_simple_SMP_Enqueue_ordered(
);
}
-static void _Scheduler_simple_SMP_Enqueue_lifo(
+static Thread_Control *_Scheduler_simple_SMP_Enqueue_lifo(
Scheduler_Context *context,
- Scheduler_Node *node
+ Scheduler_Node *node,
+ Thread_Control *needs_help
)
{
- _Scheduler_simple_SMP_Enqueue_ordered(
+ 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 void _Scheduler_simple_SMP_Enqueue_fifo(
+static Thread_Control *_Scheduler_simple_SMP_Enqueue_fifo(
Scheduler_Context *context,
- Scheduler_Node *node
+ Scheduler_Node *node,
+ Thread_Control *needs_help
)
{
- _Scheduler_simple_SMP_Enqueue_ordered(
+ 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 void _Scheduler_simple_SMP_Enqueue_scheduled_ordered(
+static Thread_Control *_Scheduler_simple_SMP_Enqueue_scheduled_ordered(
Scheduler_Context *context,
Scheduler_Node *node,
Chain_Node_order order,
@@ -235,7 +241,7 @@ static void _Scheduler_simple_SMP_Enqueue_scheduled_ordered(
Scheduler_SMP_Insert insert_scheduled
)
{
- _Scheduler_SMP_Enqueue_scheduled_ordered(
+ return _Scheduler_SMP_Enqueue_scheduled_ordered(
context,
node,
order,
@@ -247,12 +253,12 @@ static void _Scheduler_simple_SMP_Enqueue_scheduled_ordered(
);
}
-static void _Scheduler_simple_SMP_Enqueue_scheduled_lifo(
+static Thread_Control *_Scheduler_simple_SMP_Enqueue_scheduled_lifo(
Scheduler_Context *context,
Scheduler_Node *node
)
{
- _Scheduler_simple_SMP_Enqueue_scheduled_ordered(
+ return _Scheduler_simple_SMP_Enqueue_scheduled_ordered(
context,
node,
_Scheduler_SMP_Insert_priority_lifo_order,
@@ -261,12 +267,12 @@ static void _Scheduler_simple_SMP_Enqueue_scheduled_lifo(
);
}
-static void _Scheduler_simple_SMP_Enqueue_scheduled_fifo(
+static Thread_Control *_Scheduler_simple_SMP_Enqueue_scheduled_fifo(
Scheduler_Context *context,
Scheduler_Node *node
)
{
- _Scheduler_simple_SMP_Enqueue_scheduled_ordered(
+ return _Scheduler_simple_SMP_Enqueue_scheduled_ordered(
context,
node,
_Scheduler_SMP_Insert_priority_fifo_order,
@@ -275,21 +281,21 @@ static void _Scheduler_simple_SMP_Enqueue_scheduled_fifo(
);
}
-void _Scheduler_simple_SMP_Unblock(
+Thread_Control *_Scheduler_simple_SMP_Unblock(
const Scheduler_Control *scheduler,
Thread_Control *thread
)
{
Scheduler_Context *context = _Scheduler_Get_context( scheduler );
- _Scheduler_SMP_Unblock(
+ return _Scheduler_SMP_Unblock(
context,
thread,
_Scheduler_simple_SMP_Enqueue_fifo
);
}
-void _Scheduler_simple_SMP_Change_priority(
+Thread_Control *_Scheduler_simple_SMP_Change_priority(
const Scheduler_Control *scheduler,
Thread_Control *thread,
Priority_Control new_priority,
@@ -298,7 +304,7 @@ void _Scheduler_simple_SMP_Change_priority(
{
Scheduler_Context *context = _Scheduler_Get_context( scheduler );
- _Scheduler_SMP_Change_priority(
+ return _Scheduler_SMP_Change_priority(
context,
thread,
new_priority,
@@ -312,7 +318,7 @@ void _Scheduler_simple_SMP_Change_priority(
);
}
-void _Scheduler_simple_SMP_Yield(
+Thread_Control *_Scheduler_simple_SMP_Yield(
const Scheduler_Control *scheduler,
Thread_Control *thread
)
diff --git a/cpukit/score/src/schedulersimpleunblock.c b/cpukit/score/src/schedulersimpleunblock.c
index 4e49bd6697..6f9b2f719f 100644
--- a/cpukit/score/src/schedulersimpleunblock.c
+++ b/cpukit/score/src/schedulersimpleunblock.c
@@ -21,7 +21,7 @@
#include <rtems/score/schedulersimpleimpl.h>
#include <rtems/score/thread.h>
-void _Scheduler_simple_Unblock(
+Scheduler_Void_or_thread _Scheduler_simple_Unblock(
const Scheduler_Control *scheduler,
Thread_Control *the_thread
)
@@ -49,4 +49,6 @@ void _Scheduler_simple_Unblock(
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
+
+ SCHEDULER_RETURN_VOID_OR_NULL;
}
diff --git a/cpukit/score/src/schedulersimpleyield.c b/cpukit/score/src/schedulersimpleyield.c
index b807530600..66e4450477 100644
--- a/cpukit/score/src/schedulersimpleyield.c
+++ b/cpukit/score/src/schedulersimpleyield.c
@@ -20,7 +20,7 @@
#include <rtems/score/schedulersimpleimpl.h>
-void _Scheduler_simple_Yield(
+Scheduler_Void_or_thread _Scheduler_simple_Yield(
const Scheduler_Control *scheduler,
Thread_Control *the_thread
)
@@ -31,4 +31,6 @@ void _Scheduler_simple_Yield(
_Chain_Extract_unprotected( &the_thread->Object.Node );
_Scheduler_simple_Insert_priority_fifo( &context->Ready, the_thread );
_Scheduler_simple_Schedule_body( scheduler, the_thread, false );
+
+ SCHEDULER_RETURN_VOID_OR_NULL;
}