Commit graph

10 commits

Author SHA1 Message Date
David Lamparter 5daf64f63b lib: make python/ts_expand.py actually work
lib/typesafe.h was supposed to be outside the _TYPESAFE_EXPAND_MACROS
guard, so that including lib/atomlist.h grabs all the typesafe container
macros.

(No effect on normal build, as _TYPESAFE_EXPAND_MACROS is never defined
there.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-05-31 11:32:05 +02:00
David Lamparter 1badd1941b python: add tool to expand typesafe definitions
This can be used to get less cryptic error/warnings from GCC when
dealing with something typesafe container related.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-04-29 17:37:49 +02:00
David Lamparter acddc0ed3c *: auto-convert to SPDX License IDs
Done with a combination of regex'ing and banging my head against a wall.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 14:09:11 +01:00
ewlumpkin 214d8a60e1 lib: fix spelling nits in more lib files
Signed-off-by: ewlumpkin <ewlumpkin@gmail.com>
2021-10-05 21:42:57 +00: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
Renato Westphal 17e38209a5 lib, zebra: add missing extern "C" {} blocks to new header files
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-04-22 23:49:22 -03:00
David Lamparter 5d6299d7da lib/atomlist: make C++ compatible
... by using `atomic_atomptr_t`.  Other ideas seemed worse.

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-21 21:38:07 +02:00
Stephen Worley da098d78bb lib: Impelement the *_del list API.
The new list api did not implement the `*_del` endpoint as
it was described in the docs here:

http://docs.frrouting.org/projects/dev-guide/en/latest/lists.html#c.Z_del

This patch implements the endpoints to return the object deleted if
found, otherwise NULL for all but the atomic lists.

The atomic list `*_del` code is marked as TODO and will remain undefined
for now.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-07-31 11:35:21 -04:00
David Lamparter 9680a2af1c lib: add missing atomlist_init/fini
Only noticed this when trying to add atomlists to the typesafe
datastructure tests...  the atomic-specific test_atomlist doesn't use
init/fini :/

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-05-21 05:42:13 +02:00
David Lamparter bcea0c0fde lib: atomlist & atomsort
These two are lock-free linked list implementations, the plain one is
primarily intended for queues while the sorted one is for general data
storage.

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-04-27 19:33:39 +02:00