Need help in understanding some of the existing code in RTEMS
Richi Dubey
richidubey at gmail.com
Tue Jul 14 08:47:45 UTC 2020
Hi,
Can someone please help me understand how this (
https://git.rtems.org/rtems/tree/cpukit/score/src/scheduleredfsmp.c#n385)
if condition works. Why are we removing the ready queue Node from the chain
of Affine queues when we are allocating a different processor (
https://git.rtems.org/rtems/tree/cpukit/score/src/scheduleredfsmp.c#n398)
to the node which was currently scheduled on the CPU of that (the ready
queue mentioned in the if condition's) ready queue?
Thanks,
Richi.
On Mon, Jul 13, 2020 at 4:57 PM Richi Dubey <richidubey at gmail.com> wrote:
> Hi,
>
> We use a zero-length array
> <https://git.rtems.org/rtems/tree/cpukit/include/rtems/score/scheduleredfsmp.h#n105> in
> the definition of Scheduler_EDF_SMP_Context, but I can not see any code
> in scheduleredfsmp.c (
> https://git.rtems.org/rtems/tree/cpukit/score/src/scheduleredfsmp.c)
> which actually increases the size of the array. All I can see is code that
> access/manipulate the array elements, but I do not see any code which does
> malloc/adds Scheduler_EDF_SMP_Ready_queue elements to the array.
>
> Can someone please help me understand this.
>
> Thanks,
> Richi.
>
> On Sun, Jul 12, 2020 at 12:49 PM Richi Dubey <richidubey at gmail.com> wrote:
>
>> I understand now. Thank you.
>>
>> On Sat, Jul 11, 2020 at 7:35 PM Gedare Bloom <gedare at rtems.org> wrote:
>>
>>> On Sat, Jul 11, 2020 at 12:31 AM Richi Dubey <richidubey at gmail.com>
>>> wrote:
>>> >
>>> > Hi,
>>> >
>>> > I noticed that we have defined all the scheduler non entry-point
>>> functions in
>>> https://git.rtems.org/rtems/tree/cpukit/score/src/scheduleredfsmp.c as
>>> static inline, which makes them invisible inside the doxygen comments (
>>> https://docs.rtems.org/doxygen/branches/master/scheduleredfsmp_8c.html).
>>> >
>>> > Is there any reason why we choose to do so?
>>> >
>>>
>>> Encapsulation / method hiding. It is normal to define and document
>>> interfaces moreso than implementations.
>>>
>>> > Thanks,
>>> > Richi.
>>> > _______________________________________________
>>> > devel mailing list
>>> > devel at rtems.org
>>> > http://lists.rtems.org/mailman/listinfo/devel
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200714/0a2c233d/attachment-0001.html>
More information about the devel
mailing list