Need help in understanding some of the existing code in RTEMS

Richi Dubey richidubey at gmail.com
Mon Jul 13 11:27:59 UTC 2020


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/20200713/d8f57298/attachment.html>


More information about the devel mailing list