summaryrefslogtreecommitdiff
path: root/lib/seqlock.c
AgeCommit message (Collapse)Author
2024-06-20lib: use seqlock slow path with TSANDavid Lamparter
TSAN doesn't understand the OS specific "fast" seqlock code. Use the pthread mutex/condvar based path when TSAN is enabled. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09*: manual SPDX License ID conversionsDavid Lamparter
The files converted in this commit either had some random misspelling or formatting weirdness that made them escape automated replacement, or have a particularly "weird" licensing setup (e.g. dual-licensed.) This also marks a bunch of "public domain" files as SPDX License "NONE". Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-03-10treewide: fix some issues found with -Werror=undefRuben Kerkhof
Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2020-03-04*: Return bool type for bool functionsDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-07-31lib/seqlock: add a few more commentsDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-07-31lib/seqlock: add timed-wait operationDavid Lamparter
seqlock_timedwait() puts an (absolute, CLOCK_MONOTONIC) deadline on how long we wait. The RCU code uses this for its watchdog implementation. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-07-31lib/seqlock: avoid syscalls in no-waiter casesDavid Lamparter
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-04-18lib: add "seqlock" wait/broadcast primitiveDavid Lamparter
Manually tested rather extensively in addition to included unit tests, should work as intended. NB: The OpenBSD futex() code is "future"; it's not actually in OpenBSD (yet?) and thus untested. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>