summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score/schedulersmpimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-10-20 08:23:07 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-23 11:00:28 +0100
commit81659420b01f235a29a04be52ec5375d4d593f53 (patch)
tree4de8adc027a36f57f49aa15fbe84657354976575 /cpukit/include/rtems/score/schedulersmpimpl.h
parentscore: Add missing idle thread releases (diff)
downloadrtems-81659420b01f235a29a04be52ec5375d4d593f53.tar.bz2
score: Add missing idle thread exchanges
Update #4531.
Diffstat (limited to '')
-rw-r--r--cpukit/include/rtems/score/schedulersmpimpl.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/cpukit/include/rtems/score/schedulersmpimpl.h b/cpukit/include/rtems/score/schedulersmpimpl.h
index 944b4fc976..a074b53a16 100644
--- a/cpukit/include/rtems/score/schedulersmpimpl.h
+++ b/cpukit/include/rtems/score/schedulersmpimpl.h
@@ -1098,6 +1098,15 @@ static inline void _Scheduler_SMP_Schedule_highest_ready(
victim,
_Scheduler_SMP_Release_idle_thread
);
+ } else if ( action == SCHEDULER_TRY_TO_SCHEDULE_DO_IDLE_EXCHANGE ) {
+ _Scheduler_SMP_Node_change_state(
+ highest_ready,
+ SCHEDULER_SMP_NODE_SCHEDULED
+ );
+
+ ( *move_from_ready_to_scheduled )( context, highest_ready );
+
+ _Scheduler_Exchange_idle_thread( highest_ready, victim );
} else {
_Assert( action == SCHEDULER_TRY_TO_SCHEDULE_DO_BLOCK );
@@ -1162,6 +1171,15 @@ static inline void _Scheduler_SMP_Preempt_and_schedule_highest_ready(
victim,
_Scheduler_SMP_Release_idle_thread
);
+ } else if ( action == SCHEDULER_TRY_TO_SCHEDULE_DO_IDLE_EXCHANGE ) {
+ _Scheduler_SMP_Node_change_state(
+ highest_ready,
+ SCHEDULER_SMP_NODE_SCHEDULED
+ );
+
+ ( *move_from_ready_to_scheduled )( context, highest_ready );
+
+ _Scheduler_Exchange_idle_thread( highest_ready, victim );
} else {
_Assert( action == SCHEDULER_TRY_TO_SCHEDULE_DO_BLOCK );