tsearch.3: Minor tweaks to Florian Weimer's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2019-05-04 17:32:23 -05:00
parent 7c520948e2
commit fe1a03f967
1 changed files with 8 additions and 5 deletions

View File

@ -45,7 +45,7 @@ tsearch, tfind, tdelete, twalk, tdestroy \- manage a binary search tree
.PP
.BI "void twalk_r(const void *" root ", void (*" action ")(const void *" np ,
.BI " VISIT " which ", void *" closure "),
.BI " void *" closure);"
.BI " void *" closure );
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <search.h>
@ -160,11 +160,14 @@ is rather confusing.)
.BR twalk_r ()
is similar to
.BR twalk (),
but instead of the leval argument, the
but instead of the
.I depth
argument, the
.I closure
argument pointer is passed to each invocation of the action callback,
unchanged. This pointer can be used to pass information to and from
to the callback function in a thread-safe fashion, without resorting
unchanged.
This pointer can be used to pass information to and from
the callback function in a thread-safe fashion, without resorting
to global variables.
.PP
.BR tdestroy ()
@ -209,7 +212,7 @@ return NULL if
was NULL on entry.
.SH VERSIONS
.BR twalk_r ()
is available since glibc 2.30.
is available in glibc since version 2.30.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).