rtems_chain_get_first and rtems_chain_node_is_off_chain

Wendell Silva silvawp at gmail.com
Sat Apr 13 02:11:43 UTC 2013

Oh, Sorry... forget about it.

The routine rtems_chain_set_off_chain(node) is supposed to be called by the


2013/4/12 Wendell Silva <silvawp at gmail.com>

> Hi,
> Let chain C, already initialized with N nodes, N > 0.
> rtems_chain_node* node = rtems_chain_get_first(&C);
> According to the documentation of rtems_chain_get_first, the node is
> REMOVED from the chain.
> But, node doest not pass the test of being removed (or extracted) in
> rtems_chain_node_is_off_chain.
> So, rtems_chain_node_is_off_chain(node) returns false. But it should
> return true.
> Inspecting the node, I noticed that node->next and node->previous aren't
> NULL as expected for a node that was extracted from a chain.
> Conclusion: unless the term REMOVED is not the same as EXTRACTED, probably
> this is a bug in rtems_chain_get_first;
> Please, educate me if I'm wrong.
> --Wendell.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20130412/5c7997d4/attachment-0001.html>

More information about the users mailing list