linked lists

Fered a_Fered at yahoo.com
Tue Aug 28 09:22:07 UTC 2012


Chris Johns wrote:
> 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

Thank you very much Chris.

I have 32 lists of some threads. Each list can be empty or contains some 
nodes. Each thread in the OS can be in non of the lists or in one or more 
lists.(Therefor we don't know each thread will be in how many lists)
Also I need traversing these lists in specified periods of time.
These lists will be in the score. At these circumstances you say the score's 
API, is sufficient for me?



More information about the devel mailing list