Doubt in scheduler SMP function _Scheduler_SMP_Schedule_highest_ready

Richi Dubey richidubey at gmail.com
Tue Aug 4 14:14:00 UTC 2020


Hi,

I have a quick doubt about the logic in the else
<https://git.rtems.org/rtems/tree/cpukit/include/rtems/score/schedulersmpimpl.h?id=6014fadb5a5ef44c609e9e482ff837f1ff060d93#n1102>
part of the _Scheduler_SMP_Schedule_highest_ready function.

We get
<https://git.rtems.org/rtems/tree/cpukit/include/rtems/score/schedulerimpl.h?id=6014fadb5a5ef44c609e9e482ff837f1ff060d93#n972>
the action == SCHEDULER_TRY_TO_SCHEDULE_DO_BLOCK if the node returned by
get_highest_ready is already SCHEDULED and has a pinning level of 1 (or
<=1). This means that the highest ready eligible node is already scheduled
and pinned to a processor.

Why do we
<https://git.rtems.org/rtems/tree/cpukit/include/rtems/score/schedulersmpimpl.h?id=6014fadb5a5ef44c609e9e482ff837f1ff060d93#n1110>
then change its state to BLOCKED and remove it from the chain of ready
nodes?

I would appreciate your help with this.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200804/1f2b1a97/attachment.html>


More information about the devel mailing list