]> git.ipfire.org Git - thirdparty/bind9.git/commit
Add strong rwlock consistency checks to dns_rbtdb
authorOndřej Surý <ondrej@isc.org>
Fri, 14 Oct 2022 12:35:44 +0000 (14:35 +0200)
committerOndřej Surý <ondrej@isc.org>
Wed, 2 Nov 2022 07:45:48 +0000 (08:45 +0100)
commite5f7fe1f654f30bc439e8297bfe10a169643dc3f
tree9465900e5aebe9492346c47411685722232bf5a6
parent006a7f0cb647b12362f8d3dd891ee7eabbeeea23
Add strong rwlock consistency checks to dns_rbtdb

The dns_rbtdb unit already tracks the state of the node and tree rwlocks
during the top level function and passes the states of the locks to the
called functions.

Add the tree locking family of macros modeled after node locking macros,
and expand both to track the state of the lock in an external variable.
Additionally, in developer mode, add precondition to the macros, so the
lock is in required state - this should cause an assertion failure on
double locking instead of the thread getting stuck.
configure.ac
lib/dns/rbtdb.c