diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-10-21 14:33:01 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-02 10:05:44 +0100 |
commit | 9c238e1bd4bb8d3874bec65757db31d63db20d40 (patch) | |
tree | afe70511271f2408ee487e1c5c6efcd1a51e0a4c /cpukit/score/src | |
parent | score: Delete _Scheduler_Ask_for_help_if_necessary (diff) | |
download | rtems-9c238e1bd4bb8d3874bec65757db31d63db20d40.tar.bz2 |
score: Simplify update priority scheduler op
Remove unused return status.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/src/scheduleredfchangepriority.c | 8 | ||||
-rw-r--r-- | cpukit/score/src/schedulerpriorityaffinitysmp.c | 10 | ||||
-rw-r--r-- | cpukit/score/src/schedulerprioritychangepriority.c | 8 | ||||
-rw-r--r-- | cpukit/score/src/schedulerprioritysmp.c | 4 | ||||
-rw-r--r-- | cpukit/score/src/schedulersimplechangepriority.c | 6 | ||||
-rw-r--r-- | cpukit/score/src/schedulersimplesmp.c | 4 | ||||
-rw-r--r-- | cpukit/score/src/schedulerstrongapa.c | 4 |
7 files changed, 16 insertions, 28 deletions
diff --git a/cpukit/score/src/scheduleredfchangepriority.c b/cpukit/score/src/scheduleredfchangepriority.c index 8fcc1115f4..0b70bce012 100644 --- a/cpukit/score/src/scheduleredfchangepriority.c +++ b/cpukit/score/src/scheduleredfchangepriority.c @@ -36,7 +36,7 @@ Priority_Control _Scheduler_EDF_Unmap_priority( return priority & ~SCHEDULER_EDF_PRIO_MSB; } -Scheduler_Void_or_thread _Scheduler_EDF_Update_priority( +void _Scheduler_EDF_Update_priority( const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node @@ -49,7 +49,7 @@ Scheduler_Void_or_thread _Scheduler_EDF_Update_priority( if ( !_Thread_Is_ready( the_thread ) ) { /* Nothing to do */ - SCHEDULER_RETURN_VOID_OR_NULL; + return; } the_node = _Scheduler_EDF_Node_downcast( node ); @@ -57,7 +57,7 @@ Scheduler_Void_or_thread _Scheduler_EDF_Update_priority( if ( priority == the_node->priority ) { /* Nothing to do */ - SCHEDULER_RETURN_VOID_OR_NULL; + return; } the_node->priority = priority; @@ -72,6 +72,4 @@ Scheduler_Void_or_thread _Scheduler_EDF_Update_priority( } _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 466c3998f5..c1cc5be7c0 100644 --- a/cpukit/score/src/schedulerpriorityaffinitysmp.c +++ b/cpukit/score/src/schedulerpriorityaffinitysmp.c @@ -518,19 +518,15 @@ static bool _Scheduler_priority_affinity_SMP_Do_ask_for_help( ); } -/* - * This is the public scheduler specific Change Priority operation. - */ -Thread_Control *_Scheduler_priority_affinity_SMP_Update_priority( +void _Scheduler_priority_affinity_SMP_Update_priority( const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node ) { Scheduler_Context *context = _Scheduler_Get_context( scheduler ); - Thread_Control *displaced; - displaced = _Scheduler_SMP_Update_priority( + _Scheduler_SMP_Update_priority( context, thread, node, @@ -547,8 +543,6 @@ Thread_Control *_Scheduler_priority_affinity_SMP_Update_priority( * Perform any thread migrations that are needed due to these changes. */ _Scheduler_priority_affinity_SMP_Check_for_migrations( context ); - - return displaced; } bool _Scheduler_priority_affinity_SMP_Ask_for_help( diff --git a/cpukit/score/src/schedulerprioritychangepriority.c b/cpukit/score/src/schedulerprioritychangepriority.c index 339168f20c..eb640fe683 100644 --- a/cpukit/score/src/schedulerprioritychangepriority.c +++ b/cpukit/score/src/schedulerprioritychangepriority.c @@ -21,7 +21,7 @@ #include <rtems/score/schedulerpriorityimpl.h> -Scheduler_Void_or_thread _Scheduler_priority_Update_priority( +void _Scheduler_priority_Update_priority( const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node @@ -34,7 +34,7 @@ Scheduler_Void_or_thread _Scheduler_priority_Update_priority( if ( !_Thread_Is_ready( the_thread ) ) { /* Nothing to do */ - SCHEDULER_RETURN_VOID_OR_NULL; + return; } the_node = _Scheduler_priority_Node_downcast( node ); @@ -43,7 +43,7 @@ Scheduler_Void_or_thread _Scheduler_priority_Update_priority( if ( priority == the_node->Ready_queue.current_priority ) { /* Nothing to do */ - SCHEDULER_RETURN_VOID_OR_NULL; + return; } context = _Scheduler_priority_Get_context( scheduler ); @@ -76,6 +76,4 @@ Scheduler_Void_or_thread _Scheduler_priority_Update_priority( } _Scheduler_priority_Schedule_body( scheduler, the_thread, false ); - - SCHEDULER_RETURN_VOID_OR_NULL; } diff --git a/cpukit/score/src/schedulerprioritysmp.c b/cpukit/score/src/schedulerprioritysmp.c index 7b498d3cbe..4b8398a96e 100644 --- a/cpukit/score/src/schedulerprioritysmp.c +++ b/cpukit/score/src/schedulerprioritysmp.c @@ -248,7 +248,7 @@ static bool _Scheduler_priority_SMP_Do_ask_for_help( ); } -Thread_Control *_Scheduler_priority_SMP_Update_priority( +void _Scheduler_priority_SMP_Update_priority( const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node @@ -256,7 +256,7 @@ Thread_Control *_Scheduler_priority_SMP_Update_priority( { Scheduler_Context *context = _Scheduler_Get_context( scheduler ); - return _Scheduler_SMP_Update_priority( + _Scheduler_SMP_Update_priority( context, thread, node, diff --git a/cpukit/score/src/schedulersimplechangepriority.c b/cpukit/score/src/schedulersimplechangepriority.c index cad75f8d6e..8253a01421 100644 --- a/cpukit/score/src/schedulersimplechangepriority.c +++ b/cpukit/score/src/schedulersimplechangepriority.c @@ -21,7 +21,7 @@ #include <rtems/score/schedulersimpleimpl.h> -Scheduler_Void_or_thread _Scheduler_simple_Update_priority( +void _Scheduler_simple_Update_priority( const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node @@ -32,7 +32,7 @@ Scheduler_Void_or_thread _Scheduler_simple_Update_priority( if ( !_Thread_Is_ready( the_thread ) ) { /* Nothing to do */ - SCHEDULER_RETURN_VOID_OR_NULL; + return; } context = _Scheduler_simple_Get_context( scheduler ); @@ -47,6 +47,4 @@ Scheduler_Void_or_thread _Scheduler_simple_Update_priority( } _Scheduler_simple_Schedule_body( scheduler, the_thread, false ); - - SCHEDULER_RETURN_VOID_OR_NULL; } diff --git a/cpukit/score/src/schedulersimplesmp.c b/cpukit/score/src/schedulersimplesmp.c index d8f576f15b..ff43c8a908 100644 --- a/cpukit/score/src/schedulersimplesmp.c +++ b/cpukit/score/src/schedulersimplesmp.c @@ -315,7 +315,7 @@ static bool _Scheduler_simple_SMP_Do_ask_for_help( ); } -Thread_Control *_Scheduler_simple_SMP_Update_priority( +void _Scheduler_simple_SMP_Update_priority( const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node @@ -323,7 +323,7 @@ Thread_Control *_Scheduler_simple_SMP_Update_priority( { Scheduler_Context *context = _Scheduler_Get_context( scheduler ); - return _Scheduler_SMP_Update_priority( + _Scheduler_SMP_Update_priority( context, thread, node, diff --git a/cpukit/score/src/schedulerstrongapa.c b/cpukit/score/src/schedulerstrongapa.c index dca5e26f49..1fc9b5275f 100644 --- a/cpukit/score/src/schedulerstrongapa.c +++ b/cpukit/score/src/schedulerstrongapa.c @@ -374,7 +374,7 @@ static bool _Scheduler_strong_APA_Do_ask_for_help( ); } -Thread_Control *_Scheduler_strong_APA_Update_priority( +void _Scheduler_strong_APA_Update_priority( const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node @@ -382,7 +382,7 @@ Thread_Control *_Scheduler_strong_APA_Update_priority( { Scheduler_Context *context = _Scheduler_Get_context( scheduler ); - return _Scheduler_SMP_Update_priority( + _Scheduler_SMP_Update_priority( context, the_thread, node, |