]> git.ipfire.org Git - thirdparty/bind9.git/commit
Clarify reference counting in RBTDB database
authorOndřej Surý <ondrej@isc.org>
Fri, 31 Jan 2025 05:07:48 +0000 (06:07 +0100)
committerOndřej Surý <ondrej@isc.org>
Fri, 31 Jan 2025 05:15:13 +0000 (06:15 +0100)
commit2974bbba805ba2f3c145fb9116a6c21129186784
treebba51ac7c990422c0c8b7f5dbb90b343192b036f
parent8465e4516fbffc59e2d1666ad35a2db4c6a45731
Clarify reference counting in RBTDB database

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

- new_reference() and decrement_references() are now called
  dns__rbtnode_acquire() and dns__rbtnode_release()
  respectively; this reflects the fact that they modify both
  the internal and external reference counters for a node.

- rbtnode_newref() and rbtnode_decref are now called
  rbtnode_erefs_increment() and rbtnode_erefs_decrement(),
  to reflect that they only increase and decrease the node's
  external reference counters, not internal.

(cherry picked from commit 857225aeb65497f979e459269f6425f88f0e3cd2)
lib/dns/rbtdb.c