For some reason I couldn't think of the word "container" back when I
wrote most of this. It is the proper term most developers wil
understand correctly, so let's use it.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
RB-tree and double-linked-list easily support backwards iteration, and
an use case seems to have popped up. Let's make it accessible.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Sphinx tries to parse :c:function: as function prototype, which doesn't
quite work with macros.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Based on work originally by Mark Stapp <mjs@voltanet.io>.
Make it possible to iterate the typesafe lists in a const
context, as well as find items from them.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
[above signoff was for the original version before modification]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
The lists documentation had not been updated to represent
the for_eachXXX to frr_eachXXX changes. Make it so.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This is an 8-ary heap (cacheline optimized.) It works as a semi-sorted
kind of middle ground between unsorted and sorted datastructures; pop()
always returns the lowest item but ordering is only loosely enforced.
Signed-off-by: David Lamparter <equinox@diac24.net>
Turns out we need one of these. Same API as DECLARE_LIST, but deleting
random items is much faster.
Signed-off-by: David Lamparter <equinox@diac24.net>
Noticed during attempts at usage that the documentation
needed a couple small updates:
1) Tell the user which header to include
2) Some functions want the address of the data structure
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Noticed during attempts at usage that the documentation
needed a couple small updates:
1) Tell the user which header to include
2) Some functions want the address of the data structure
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>