Commit Graph

21 Commits

Author SHA1 Message Date
Donald Sharp
ed18e04d91 doc: Fix spelling of choosen
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-19 08:28:47 -04:00
Donald Sharp
485ac9a79b *: Fix spelling of neccessary
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-19 08:11:29 -04:00
David Lamparter
99eba3098c doc/developer: remove outdated paragraph
We have `_anywhere` and `_member` now, so this has become outdated.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-03-12 13:23:36 +01:00
David Lamparter
627198d18c doc/developer: reword list -> container
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>
2022-03-12 13:23:36 +01:00
David Lamparter
643ea83be2 lib: add _last and _prev on typesafe RB/DLIST
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>
2022-03-12 13:23:36 +01:00
David Lamparter
e1111c5faf doc/developer: add _member and _anywhere
New members in the typesafe.h API club.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-10-19 14:55:39 +02:00
David Lamparter
4c0e52367a doc/developer: fix duplicate const prototypes
The const ones have const in the name.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-10-14 19:19:44 +02:00
David Lamparter
8c69c8f743 doc/developer: use :c:macro: where appropriate
Sphinx tries to parse :c:function: as function prototype, which doesn't
quite work with macros.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-10-14 19:17:30 +02:00
David Lamparter
507e0e5d66 lib: add *_swap_all to typesafe containers
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-05-03 20:55:04 +02:00
David Lamparter
960b9a5383 *: require semicolon after DEFINE_<typesafe...>
Again, see previous commits.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17 06:18:39 +01:00
Quentin Young
5b72a1332b doc: add notes about hash table invariants
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-09-08 12:10:10 -04:00
David Lamparter
daf3441d2b lib: add const iteration & find to typesafe lists
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>
2020-05-04 22:13:28 +02:00
Donald Sharp
bf9735b240 doc: Fixup some missing syntax
We were missing some syntax indicators for stuff in doc/developer
add them in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-02-14 14:17:52 -05:00
David Lamparter
e51f518467 doc: add a small FAQ for the typesafe datastructs
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-08-01 16:54:18 +02:00
Donald Sharp
493ecb4ffa doc: Update docs to represent changes on the ground
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>
2019-05-25 20:28:35 -04:00
David Lamparter
5cb4277dfe lib: add DECLARE_HEAP datastructure
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>
2019-05-21 05:42:13 +02:00
David Lamparter
fdad523b54 lib: add DECLARE_DLIST (double-linked list)
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>
2019-05-21 05:18:16 +02:00
Donald Sharp
21fee7927f doc: Some minor doc cleanup for new data structures
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>
2019-05-02 16:21:38 -04:00
Lou Berger
e8b9ad5cdd
Revert "Zebra diet" 2019-05-02 06:54:59 -04:00
Donald Sharp
820b3b6596 doc: Some minor doc cleanup for new data structures
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>
2019-05-01 20:28:57 -04:00
David Lamparter
737d6e0956 doc: add developer docs for type-safe lists
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-04-27 19:33:45 +02:00