[rtems commit] score: Simplify _Scheduler_SMP_Yield()

Sebastian Huber sebh at rtems.org
Tue Nov 23 13:34:54 UTC 2021


Module:    rtems
Branch:    master
Commit:    f767ef805968ca6e15ebbd70ab34d888e1cd88e5
Changeset: http://git.rtems.org/rtems/commit/?id=f767ef805968ca6e15ebbd70ab34d888e1cd88e5

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Oct 29 08:29:51 2021 +0200

score: Simplify _Scheduler_SMP_Yield()

There is not need to actively ask for help in a yield operation.  The helping
is already done on demand by the other scheduler operations.

---

 cpukit/include/rtems/score/schedulersmpimpl.h | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/cpukit/include/rtems/score/schedulersmpimpl.h b/cpukit/include/rtems/score/schedulersmpimpl.h
index ab20a55..2ebcd98 100644
--- a/cpukit/include/rtems/score/schedulersmpimpl.h
+++ b/cpukit/include/rtems/score/schedulersmpimpl.h
@@ -1435,7 +1435,6 @@ static inline void _Scheduler_SMP_Yield(
   Scheduler_SMP_Enqueue_scheduled enqueue_scheduled
 )
 {
-  bool                     needs_help;
   Scheduler_SMP_Node_state node_state;
   Priority_Control         insert_priority;
 
@@ -1446,17 +1445,9 @@ static inline void _Scheduler_SMP_Yield(
   if ( node_state == SCHEDULER_SMP_NODE_SCHEDULED ) {
     ( *extract_from_scheduled )( context, node );
     ( *enqueue_scheduled )( context, node, insert_priority );
-    needs_help = false;
   } else if ( node_state == SCHEDULER_SMP_NODE_READY ) {
     ( *extract_from_ready )( context, node );
-
-    needs_help = ( *enqueue )( context, node, insert_priority );
-  } else {
-    needs_help = true;
-  }
-
-  if ( needs_help ) {
-    _Scheduler_Ask_for_help( thread );
+    (void) ( *enqueue )( context, node, insert_priority );
   }
 }
 



More information about the vc mailing list