[PATCH] score: Simplify _Scheduler_Generic_block()

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Oct 29 12:05:18 UTC 2021


If we block the executing thread and it is not the heir thread, then there is
no need to run the schedule operation.  The scheduler already selected a new
heir.
---
 cpukit/include/rtems/score/schedulerimpl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/include/rtems/score/schedulerimpl.h b/cpukit/include/rtems/score/schedulerimpl.h
index f326d6ade6..dda1b4ee6e 100644
--- a/cpukit/include/rtems/score/schedulerimpl.h
+++ b/cpukit/include/rtems/score/schedulerimpl.h
@@ -678,7 +678,7 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Generic_block(
 
   /* TODO: flash critical section? */
 
-  if ( _Thread_Is_executing( the_thread ) || _Thread_Is_heir( the_thread ) ) {
+  if ( _Thread_Is_heir( the_thread ) ) {
     ( *schedule )( scheduler, the_thread, true );
   }
 }
-- 
2.26.2



More information about the devel mailing list