summaryrefslogtreecommitdiffstats
path: root/lib/seqlock.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* treewide: fix some issues found with -Werror=undefRuben Kerkhof2020-03-101-2/+2
| | | | Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
* *: Return bool type for bool functionsDonatas Abraitis2020-03-041-1/+1
| | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* lib/seqlock: add a few more commentsDavid Lamparter2019-07-311-5/+25
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib/seqlock: add timed-wait operationDavid Lamparter2019-07-311-3/+105
| | | | | | | 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>
* lib/seqlock: avoid syscalls in no-waiter casesDavid Lamparter2019-07-311-17/+39
| | | | | | | When we have no contention on the seqlock, we shouldn't incur the cost of syscalls. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: add "seqlock" wait/broadcast primitiveDavid Lamparter2019-04-181-0/+167
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>