-.\" $OpenBSD: refcnt_init.9,v 1.3 2022/04/30 14:44:04 visa Exp $
+.\" $OpenBSD: refcnt_init.9,v 1.4 2023/07/06 20:51:31 kn Exp $
.\"
.\" Copyright (c) 2015 David Gwynne <dlg@openbsd.org>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: April 30 2022 $
+.Dd $Mdocdate: July 6 2023 $
.Dt REFCNT_INIT 9
.Os
.Sh NAME
.Ft void
.Fn "refcnt_init" "struct refcnt *r"
.Ft void
+.Fn "refcnt_init_trace" "struct refcnt *r" "int idx"
+.Ft void
.Fn "refcnt_take" "struct refcnt *r"
.Ft int
.Fn "refcnt_rele" "struct refcnt *r"
.Fn refcnt_init
sets the initial value of the counter to 1 to account for the caller's
reference to the object.
+.Fn refcnt_init_trace
+additionally accepts a
+.Xr dt 4
+static probe index.
.Pp
.Fn refcnt_take
is used to acquire a new reference.
initialises a declaration of a refcnt to 1.
.Sh CONTEXT
.Fn refcnt_init ,
+.Fn refcnt_init_trace ,
.Fn refcnt_take ,
.Fn refcnt_rele ,
.Fn refcnt_rele_wake ,