[PATCH 14/27] score: Add SMP scheduler idle exchange callback

Gedare Bloom gedare at rtems.org
Sat Nov 20 20:42:49 UTC 2021


On Mon, Nov 15, 2021 at 10:14 AM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> Update #4531.
> ---
>  cpukit/include/rtems/score/schedulersmpimpl.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/cpukit/include/rtems/score/schedulersmpimpl.h b/cpukit/include/rtems/score/schedulersmpimpl.h
> index 499cff5c6c..54ed976e85 100644
> --- a/cpukit/include/rtems/score/schedulersmpimpl.h
> +++ b/cpukit/include/rtems/score/schedulersmpimpl.h
> @@ -847,6 +847,7 @@ static inline void _Scheduler_SMP_Enqueue_to_scheduled(
>      ( *insert_scheduled )( context, node, priority );
>
>      _Scheduler_Exchange_idle_thread( node, lowest_scheduled );
> +    ( *allocate_processor )( context, node, lowest_scheduled, _Thread_Get_CPU( _Scheduler_Node_get_user( node ) ) );

style: line length

>    } else {
>      _Assert( action == SCHEDULER_TRY_TO_SCHEDULE_DO_BLOCK );
>      _Scheduler_SMP_Node_change_state( node, SCHEDULER_SMP_NODE_BLOCKED );
> @@ -1021,6 +1022,7 @@ static inline void _Scheduler_SMP_Enqueue_scheduled(
>        ( *insert_ready )( context, node, insert_priority );
>
>        _Scheduler_Exchange_idle_thread( highest_ready, node );
> +      ( *allocate_processor )( context, highest_ready, node, _Thread_Get_CPU( _Scheduler_Node_get_user( highest_ready ) ) );
>        return;
>      } else {
>        _Assert( action == SCHEDULER_TRY_TO_SCHEDULE_DO_BLOCK );
> @@ -1111,6 +1113,7 @@ static inline void _Scheduler_SMP_Schedule_highest_ready(
>        ( *move_from_ready_to_scheduled )( context, highest_ready );
>
>        _Scheduler_Exchange_idle_thread( highest_ready, victim );
> +      ( *allocate_processor )( context, highest_ready, victim, _Thread_Get_CPU( _Scheduler_Node_get_user( highest_ready ) ) );
>      } else {
>        _Assert( action == SCHEDULER_TRY_TO_SCHEDULE_DO_BLOCK );
>
> @@ -1184,6 +1187,7 @@ static inline void _Scheduler_SMP_Preempt_and_schedule_highest_ready(
>        ( *move_from_ready_to_scheduled )( context, highest_ready );
>
>        _Scheduler_Exchange_idle_thread( highest_ready, victim );
> +      ( *allocate_processor )( context, highest_ready, victim, _Thread_Get_CPU( _Scheduler_Node_get_user( highest_ready ) ) );
>      } else {
>        _Assert( action == SCHEDULER_TRY_TO_SCHEDULE_DO_BLOCK );
>
> --
> 2.26.2
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list