linked lists
Chris Johns
chrisj at rtems.org
Tue Aug 28 07:38:43 UTC 2012
Fered wrote:
> Fered wrote:
>> Suppose I want to have a linked list of some threads in RTEMS core. It's a
>> OS level data structure. Same as _Thread_Ready_chain.
>
> I expected more answers!
>
Sure, so asking again is fine.
I use the score chains where I can in RTEMS. If the code
is in the score I use the score API. You can find examples of chains
being used in the score. If the code is for the cpukit I use the RTEMS
API for chains. This is the score chains API exported as an RTEMS API.
You can find examples of this in the libblock/src/bdbuf.c code or the
RFS file system in cpukit/libfs.
In applications I also use the RTEMS API and sometimes I use the BSD
lists. It just depends on what I need to do.
You indicate you have an OS level data structure but I am still not
clear where the code lives. For example an OS data structure could be
hooked onto a watchdog chain so I would use the RTEMS chains API. If you
are adding code to the score then the score's API is fine. Using score
APIs outside the score are not encouraged.
Does this help ?
Chris
More information about the devel
mailing list