]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fixes for liburcu-qsbr
authorTony Finch <fanf@isc.org>
Mon, 15 May 2023 10:42:33 +0000 (11:42 +0100)
committerTony Finch <fanf@isc.org>
Mon, 15 May 2023 20:49:42 +0000 (20:49 +0000)
commitc319ccd4c9bb3f2d2b41ea7d67b0b79a33382fab
tree016f71b0f911825d32cfcf4baff5b61ad26f00ed
parentb4326572ddee63c9d68ad97fdb57294df4554cc2
Fixes for liburcu-qsbr

Move registration and deregistration of the main thread from
`isc_loopmgr_run()` into `isc__initialize()` / `isc__shutdown()`:
liburcu-qsbr fails an assertion if we try to use it from an
unregistered thread, and we need to be able to use it when the
event loops are not running.

Use `rcu_assign_pointer()` and `rcu_dereference()` in qp-trie
transactions so that they properly mark threads as online. The
RCU-protected pointer is no longer declared atomic because
liburcu does not (yet) use standard C atomics.

Fix the definition of `isc_qsbr_rcu_dereference()` to return
the referenced value, and to call the right function inside
liburcu.

Change the thread sanitizer suppressions to match any variant of
`rcu_*_barrier()`
.tsan-suppress
lib/dns/qp.c
lib/dns/qp_p.h
lib/isc/include/isc/urcu.h
lib/isc/lib.c
lib/isc/loop.c
tests/libtest/qp.c