]> git.ipfire.org Git - thirdparty/bind9.git/commit
Clarify reference counting in QP databases
authorEvan Hunt <each@isc.org>
Thu, 30 Jan 2025 22:42:57 +0000 (14:42 -0800)
committerEvan Hunt <each@isc.org>
Fri, 31 Jan 2025 04:08:46 +0000 (20:08 -0800)
commitd4f791793e2db06f63243eebb7c1a1de66d5792c
treedfc339d726bafc9989eea33ea19a5ed61f0cec79
parent431513d8b3cc595a7612479fd7811e959501e6dd
Clarify reference counting in QP databases

Change the names of the node reference counting functions
and add comments to make the mechanism easier to understand:

- newref() and decref() are now called qpcnode_acquire()/
  qpznode_acquire() and qpcnode_release()/qpznode_release()
  respectively; this reflects the fact that they modify both
  the internal and external reference counters for a node.

- qpcnode_newref() and qpznode_newref() are now called
  qpcnode_erefs_increment() and qpznode_erefs_increment(), and
  qpcnode_decref() and qpznode_decref() are now called
  qpcnode_erefs_decrement() and qpznode_erefs_decrement(),
  to reflect that they only increase and decrease the node's
  external reference counters, not internal.
lib/dns/qpcache.c
lib/dns/qpzone.c