Commit graph

7 commits

Author SHA1 Message Date
David Lamparter e14c94f2b7 tests: fix TSAN warnings in atomlist test
The atomlist test consists of a sequence of (MT) sub-tests, from which
counters are collected and verified.  TSAN doesn't know that these
counters are synchronized by way of the sub-test starting and finishing,
so it complains.  Just use atomics to get rid of the warning.

(This is solely an issue with the test, not the atomlist code.  There
are no warnings from that.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-06-20 15:44:46 +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
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
David Lamparter fb84c629b8 tests: use printfrr-based printf()
Just a small hack to use printfrr() in tests, since otherwise the
redefined PRId64 trips some warnings.

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-03-29 10:45:46 +02:00
David Lamparter 6046b690b5 lib/seqlock: avoid syscalls in no-waiter cases
When we have no contention on the seqlock, we shouldn't incur the cost
of syscalls.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-07-31 03:33:41 +02:00
Renato Westphal 81fddbe7ae *: rename new ForEach macros from the typesafe API
This is necessary to avoid a name collision with std::for_each
from C++.

Fixes the compilation of the gRPC northbound module.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-05-21 15:59:08 -03: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