<div dir="ltr">Looks ok to me.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 10, 2023 at 1:21 AM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The goto label was directly after the loop, so we can replace the goto<br>
with a break.<br>
<br>
Close #4847.<br>
---<br>
 cpukit/score/src/threaddispatch.c | 17 +++++++++++------<br>
 1 file changed, 11 insertions(+), 6 deletions(-)<br>
<br>
diff --git a/cpukit/score/src/threaddispatch.c b/cpukit/score/src/threaddispatch.c<br>
index b2426fa8ac..ad4c1aca3e 100644<br>
--- a/cpukit/score/src/threaddispatch.c<br>
+++ b/cpukit/score/src/threaddispatch.c<br>
@@ -301,12 +301,13 @@ void _Thread_Do_dispatch( Per_CPU_Control *cpu_self, ISR_Level level )<br>
     heir = _Thread_Get_heir_and_make_it_executing( cpu_self );<br>
<br>
     /*<br>
-     *  When the heir and executing are the same, then we are being<br>
-     *  requested to do the post switch dispatching.  This is normally<br>
-     *  done to dispatch signals.<br>
+     * If the heir and executing are the same, then there is no need to do a<br>
+     * context switch.  Proceed to run the post switch actions.  This is<br>
+     * normally done to dispatch signals.<br>
      */<br>
-    if ( heir == executing )<br>
-      goto post_switch;<br>
+    if ( heir == executing ) {<br>
+      break;<br>
+    }<br>
<br>
     /*<br>
      *  Since heir and executing are not the same, we need to do a real<br>
@@ -341,7 +342,11 @@ void _Thread_Do_dispatch( Per_CPU_Control *cpu_self, ISR_Level level )<br>
     _ISR_Local_disable( level );<br>
   } while ( cpu_self->dispatch_necessary );<br>
<br>
-post_switch:<br>
+  /*<br>
+   * We are done with context switching.  Proceed to run the post switch<br>
+   * actions.<br>
+   */<br>
+<br>
   _Assert( cpu_self->thread_dispatch_disable_level == 1 );<br>
   cpu_self->thread_dispatch_disable_level = 0;<br>
   _Profiling_Thread_dispatch_enable( cpu_self, 0 );<br>
-- <br>
2.35.3<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div>