<div dir="ltr">Got it. Thank you for the clarification.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 26, 2021 at 8:32 PM Gedare Bloom <<a href="mailto:gedare@rtems.org">gedare@rtems.org</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">On Thu, Mar 25, 2021 at 11:30 PM Richi Dubey <<a href="mailto:richidubey@gmail.com" target="_blank">richidubey@gmail.com</a>> wrote:<br>
><br>
> Thanks for your quick response!<br>
><br>
>> Each scheduler has its own lock. There are a couple of more locks involved.<br>
><br>
> I understand.<br>
><br>
> I backtracked a little and found that we have:<br>
> _Thread_State_acquire_critical( the_thread, lock_context );<br>
><br>
> to lock access to thread-specific variables.<br>
><br>
> _Scheduler_Acquire_critical( scheduler, &lock_context<br>
><br>
> to lock access to the current scheduler-specific data structures.<br>
><br>
> What other locks do we have related to schedulers?<br>
><br>
<br>
By definition, all locks relate to scheduling. The other major one<br>
though would be _Thread_Dispatch_disable_critical and relatives like<br>
_Thread_queue_Dispatch_disable, if you think of dispatching as part of<br>
scheduling. However, the two operations are a little bit different.<br>
Scheduling is selecting the next thread(s) to run, while dispatching<br>
is actually making them run.<br>
<br>
<br>
> On Wed, Mar 24, 2021 at 1:03 PM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>> wrote:<br>
>><br>
>> On 24/03/2021 08:07, Richi Dubey wrote:<br>
>><br>
>> > How does RTEMS handle cases where two different cores access<br>
>> > scheduler-related functions at the same time?<br>
>> Each scheduler has its own lock. There are a couple of more locks involved.<br>
>> > For ex., Can they access (or modify) the Scheduler_strong_APA_Context<br>
>> > <<a href="https://git.rtems.org/rtems/tree/cpukit/include/rtems/score/schedulerstrongapa.h#n61" rel="noreferrer" target="_blank">https://git.rtems.org/rtems/tree/cpukit/include/rtems/score/schedulerstrongapa.h#n61</a>><br>
>> > at the same time?<br>
>> No, unless we have a bug.<br>
>><br>
>> --<br>
>> embedded brains GmbH<br>
>> Herr Sebastian HUBER<br>
>> Dornierstr. 4<br>
>> 82178 Puchheim<br>
>> Germany<br>
>> email: <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
>> phone: +49-89-18 94 741 - 16<br>
>> fax: +49-89-18 94 741 - 08<br>
>><br>
>> Registergericht: Amtsgericht München<br>
>> Registernummer: HRB 157899<br>
>> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler<br>
>> Unsere Datenschutzerklärung finden Sie hier:<br>
>> <a href="https://embedded-brains.de/datenschutzerklaerung/" rel="noreferrer" target="_blank">https://embedded-brains.de/datenschutzerklaerung/</a><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>