rtems_chain_get_first and rtems_chain_node_is_off_chain

Wendell Silva silvawp at gmail.com
Sat Apr 13 02:09:40 UTC 2013


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


More information about the users mailing list