linked lists

Fered a_Fered at yahoo.com
Thu Aug 23 07:17:42 UTC 2012


Hi;
Some questions about linked lists in RTEMS:

1- Is the recommended method for having linked lists, using Chain_Control 
struct?

2- Please tell me how can I create a linked list, add node and delete node 
using Chain_Control.

3- If I have a pointer to a Chain_Node, how can I access to the original node?
for example if I have 
struct n { int id; Chain_Node ch;};
and I have a pointer to ch, how can I access id?

4- Suppose I have an struct s such as bellow:
struct s{
int id;
Chain_Control list;
};
if I have a pointer to a Chain_Node in the list, can I access id?

Thanks a lot.



More information about the devel mailing list