Tue Nov 22 00:07:40 2016 UTC ()
Document td_thr_iter(3) from libpthread_dbg(3)

td_thr_iter - iterate over the threads in the process

Sponsored by <The NetBSD Foundation>


(kamil)
diff -r1.2071 -r1.2072 src/distrib/sets/lists/comp/mi
diff -r1.13 -r1.14 src/lib/libpthread_dbg/Makefile
diff -r0 -r1.1 src/lib/libpthread_dbg/td_thr_iter.3

cvs diff -r1.2071 -r1.2072 src/distrib/sets/lists/comp/mi (expand / switch to unified diff)

--- src/distrib/sets/lists/comp/mi 2016/11/21 22:19:03 1.2071
+++ src/distrib/sets/lists/comp/mi 2016/11/22 00:07:40 1.2072
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: mi,v 1.2071 2016/11/21 22:19:03 kamil Exp $ 1# $NetBSD: mi,v 1.2072 2016/11/22 00:07:40 kamil Exp $
2# 2#
3# Note: don't delete entries from here - mark them as "obsolete" instead. 3# Note: don't delete entries from here - mark them as "obsolete" instead.
4./etc/mtree/set.comp comp-sys-root 4./etc/mtree/set.comp comp-sys-root
5./usr/bin/addr2line comp-debug-bin binutils 5./usr/bin/addr2line comp-debug-bin binutils
6./usr/bin/ar comp-util-bin binutils 6./usr/bin/ar comp-util-bin binutils
7./usr/bin/as comp-util-bin binutils 7./usr/bin/as comp-util-bin binutils
8./usr/bin/asa comp-fortran-bin 8./usr/bin/asa comp-fortran-bin
9./usr/bin/atf-compile comp-obsolete obsolete 9./usr/bin/atf-compile comp-obsolete obsolete
10./usr/bin/c++ comp-cxx-bin gcccmds 10./usr/bin/c++ comp-cxx-bin gcccmds
11./usr/bin/c++filt comp-cxx-bin binutils 11./usr/bin/c++filt comp-cxx-bin binutils
12./usr/bin/c11 comp-c-bin 12./usr/bin/c11 comp-c-bin
13./usr/bin/c89 comp-c-bin 13./usr/bin/c89 comp-c-bin
14./usr/bin/c99 comp-c-bin 14./usr/bin/c99 comp-c-bin
@@ -9355,26 +9355,27 @@ @@ -9355,26 +9355,27 @@
9355./usr/share/man/cat3/tanhf.0 comp-c-catman .cat 9355./usr/share/man/cat3/tanhf.0 comp-c-catman .cat
9356./usr/share/man/cat3/tcdrain.0 comp-c-catman .cat 9356./usr/share/man/cat3/tcdrain.0 comp-c-catman .cat
9357./usr/share/man/cat3/tcflow.0 comp-c-catman .cat 9357./usr/share/man/cat3/tcflow.0 comp-c-catman .cat
9358./usr/share/man/cat3/tcflush.0 comp-c-catman .cat 9358./usr/share/man/cat3/tcflush.0 comp-c-catman .cat
9359./usr/share/man/cat3/tcgetattr.0 comp-c-catman .cat 9359./usr/share/man/cat3/tcgetattr.0 comp-c-catman .cat
9360./usr/share/man/cat3/tcgetpgrp.0 comp-c-catman .cat 9360./usr/share/man/cat3/tcgetpgrp.0 comp-c-catman .cat
9361./usr/share/man/cat3/tcgetsid.0 comp-c-catman .cat 9361./usr/share/man/cat3/tcgetsid.0 comp-c-catman .cat
9362./usr/share/man/cat3/tcsendbreak.0 comp-c-catman .cat 9362./usr/share/man/cat3/tcsendbreak.0 comp-c-catman .cat
9363./usr/share/man/cat3/tcsetattr.0 comp-c-catman .cat 9363./usr/share/man/cat3/tcsetattr.0 comp-c-catman .cat
9364./usr/share/man/cat3/tcsetpgrp.0 comp-c-catman .cat 9364./usr/share/man/cat3/tcsetpgrp.0 comp-c-catman .cat
9365./usr/share/man/cat3/td_close.0 comp-c-catman .cat 9365./usr/share/man/cat3/td_close.0 comp-c-catman .cat
9366./usr/share/man/cat3/td_open.0 comp-c-catman .cat 9366./usr/share/man/cat3/td_open.0 comp-c-catman .cat
9367./usr/share/man/cat3/td_thr_info.0 comp-c-catman .cat 9367./usr/share/man/cat3/td_thr_info.0 comp-c-catman .cat
 9368./usr/share/man/cat3/td_thr_iter.0 comp-c-catman .cat
9368./usr/share/man/cat3/tdelete.0 comp-c-catman .cat 9369./usr/share/man/cat3/tdelete.0 comp-c-catman .cat
9369./usr/share/man/cat3/telldir.0 comp-c-catman .cat 9370./usr/share/man/cat3/telldir.0 comp-c-catman .cat
9370./usr/share/man/cat3/tempnam.0 comp-c-catman .cat 9371./usr/share/man/cat3/tempnam.0 comp-c-catman .cat
9371./usr/share/man/cat3/termcap.0 comp-c-catman .cat 9372./usr/share/man/cat3/termcap.0 comp-c-catman .cat
9372./usr/share/man/cat3/terminfo.0 comp-c-catman .cat 9373./usr/share/man/cat3/terminfo.0 comp-c-catman .cat
9373./usr/share/man/cat3/termname.0 comp-c-catman .cat 9374./usr/share/man/cat3/termname.0 comp-c-catman .cat
9374./usr/share/man/cat3/textdomain.0 comp-c-catman .cat 9375./usr/share/man/cat3/textdomain.0 comp-c-catman .cat
9375./usr/share/man/cat3/tfind.0 comp-c-catman .cat 9376./usr/share/man/cat3/tfind.0 comp-c-catman .cat
9376./usr/share/man/cat3/tgamma.0 comp-c-catman .cat 9377./usr/share/man/cat3/tgamma.0 comp-c-catman .cat
9377./usr/share/man/cat3/tgammaf.0 comp-c-catman .cat 9378./usr/share/man/cat3/tgammaf.0 comp-c-catman .cat
9378./usr/share/man/cat3/tgetent.0 comp-c-catman .cat 9379./usr/share/man/cat3/tgetent.0 comp-c-catman .cat
9379./usr/share/man/cat3/tgetflag.0 comp-c-catman .cat 9380./usr/share/man/cat3/tgetflag.0 comp-c-catman .cat
9380./usr/share/man/cat3/tgetnum.0 comp-c-catman .cat 9381./usr/share/man/cat3/tgetnum.0 comp-c-catman .cat
@@ -16614,26 +16615,27 @@ @@ -16614,26 +16615,27 @@
16614./usr/share/man/html3/tanhf.html comp-c-htmlman html 16615./usr/share/man/html3/tanhf.html comp-c-htmlman html
16615./usr/share/man/html3/tcdrain.html comp-c-htmlman html 16616./usr/share/man/html3/tcdrain.html comp-c-htmlman html
16616./usr/share/man/html3/tcflow.html comp-c-htmlman html 16617./usr/share/man/html3/tcflow.html comp-c-htmlman html
16617./usr/share/man/html3/tcflush.html comp-c-htmlman html 16618./usr/share/man/html3/tcflush.html comp-c-htmlman html
16618./usr/share/man/html3/tcgetattr.html comp-c-htmlman html 16619./usr/share/man/html3/tcgetattr.html comp-c-htmlman html
16619./usr/share/man/html3/tcgetpgrp.html comp-c-htmlman html 16620./usr/share/man/html3/tcgetpgrp.html comp-c-htmlman html
16620./usr/share/man/html3/tcgetsid.html comp-c-htmlman html 16621./usr/share/man/html3/tcgetsid.html comp-c-htmlman html
16621./usr/share/man/html3/tcsendbreak.html comp-c-htmlman html 16622./usr/share/man/html3/tcsendbreak.html comp-c-htmlman html
16622./usr/share/man/html3/tcsetattr.html comp-c-htmlman html 16623./usr/share/man/html3/tcsetattr.html comp-c-htmlman html
16623./usr/share/man/html3/tcsetpgrp.html comp-c-htmlman html 16624./usr/share/man/html3/tcsetpgrp.html comp-c-htmlman html
16624./usr/share/man/html3/td_close.html comp-c-htmlman html 16625./usr/share/man/html3/td_close.html comp-c-htmlman html
16625./usr/share/man/html3/td_open.html comp-c-htmlman html 16626./usr/share/man/html3/td_open.html comp-c-htmlman html
16626./usr/share/man/html3/td_thr_info.html comp-c-htmlman html 16627./usr/share/man/html3/td_thr_info.html comp-c-htmlman html
 16628./usr/share/man/html3/td_thr_iter.html comp-c-htmlman html
16627./usr/share/man/html3/tdelete.html comp-c-htmlman html 16629./usr/share/man/html3/tdelete.html comp-c-htmlman html
16628./usr/share/man/html3/telldir.html comp-c-htmlman html 16630./usr/share/man/html3/telldir.html comp-c-htmlman html
16629./usr/share/man/html3/tempnam.html comp-c-htmlman html 16631./usr/share/man/html3/tempnam.html comp-c-htmlman html
16630./usr/share/man/html3/termcap.html comp-c-htmlman html 16632./usr/share/man/html3/termcap.html comp-c-htmlman html
16631./usr/share/man/html3/terminfo.html comp-c-htmlman html 16633./usr/share/man/html3/terminfo.html comp-c-htmlman html
16632./usr/share/man/html3/termname.html comp-c-htmlman html 16634./usr/share/man/html3/termname.html comp-c-htmlman html
16633./usr/share/man/html3/textdomain.html comp-c-htmlman html 16635./usr/share/man/html3/textdomain.html comp-c-htmlman html
16634./usr/share/man/html3/tfind.html comp-c-htmlman html 16636./usr/share/man/html3/tfind.html comp-c-htmlman html
16635./usr/share/man/html3/tgamma.html comp-c-htmlman html 16637./usr/share/man/html3/tgamma.html comp-c-htmlman html
16636./usr/share/man/html3/tgammaf.html comp-c-htmlman html 16638./usr/share/man/html3/tgammaf.html comp-c-htmlman html
16637./usr/share/man/html3/tgetent.html comp-c-htmlman html 16639./usr/share/man/html3/tgetent.html comp-c-htmlman html
16638./usr/share/man/html3/tgetflag.html comp-c-htmlman html 16640./usr/share/man/html3/tgetflag.html comp-c-htmlman html
16639./usr/share/man/html3/tgetnum.html comp-c-htmlman html 16641./usr/share/man/html3/tgetnum.html comp-c-htmlman html
@@ -23934,26 +23936,27 @@ @@ -23934,26 +23936,27 @@
23934./usr/share/man/man3/tanhf.3 comp-c-man .man 23936./usr/share/man/man3/tanhf.3 comp-c-man .man
23935./usr/share/man/man3/tcdrain.3 comp-c-man .man 23937./usr/share/man/man3/tcdrain.3 comp-c-man .man
23936./usr/share/man/man3/tcflow.3 comp-c-man .man 23938./usr/share/man/man3/tcflow.3 comp-c-man .man
23937./usr/share/man/man3/tcflush.3 comp-c-man .man 23939./usr/share/man/man3/tcflush.3 comp-c-man .man
23938./usr/share/man/man3/tcgetattr.3 comp-c-man .man 23940./usr/share/man/man3/tcgetattr.3 comp-c-man .man
23939./usr/share/man/man3/tcgetpgrp.3 comp-c-man .man 23941./usr/share/man/man3/tcgetpgrp.3 comp-c-man .man
23940./usr/share/man/man3/tcgetsid.3 comp-c-man .man 23942./usr/share/man/man3/tcgetsid.3 comp-c-man .man
23941./usr/share/man/man3/tcsendbreak.3 comp-c-man .man 23943./usr/share/man/man3/tcsendbreak.3 comp-c-man .man
23942./usr/share/man/man3/tcsetattr.3 comp-c-man .man 23944./usr/share/man/man3/tcsetattr.3 comp-c-man .man
23943./usr/share/man/man3/tcsetpgrp.3 comp-c-man .man 23945./usr/share/man/man3/tcsetpgrp.3 comp-c-man .man
23944./usr/share/man/man3/td_close.3 comp-c-man .man 23946./usr/share/man/man3/td_close.3 comp-c-man .man
23945./usr/share/man/man3/td_open.3 comp-c-man .man 23947./usr/share/man/man3/td_open.3 comp-c-man .man
23946./usr/share/man/man3/td_thr_info.3 comp-c-man .man 23948./usr/share/man/man3/td_thr_info.3 comp-c-man .man
 23949./usr/share/man/man3/td_thr_iter.3 comp-c-man .man
23947./usr/share/man/man3/tdelete.3 comp-c-man .man 23950./usr/share/man/man3/tdelete.3 comp-c-man .man
23948./usr/share/man/man3/telldir.3 comp-c-man .man 23951./usr/share/man/man3/telldir.3 comp-c-man .man
23949./usr/share/man/man3/tempnam.3 comp-c-man .man 23952./usr/share/man/man3/tempnam.3 comp-c-man .man
23950./usr/share/man/man3/termcap.3 comp-c-man .man 23953./usr/share/man/man3/termcap.3 comp-c-man .man
23951./usr/share/man/man3/terminfo.3 comp-c-man .man 23954./usr/share/man/man3/terminfo.3 comp-c-man .man
23952./usr/share/man/man3/termname.3 comp-c-man .man 23955./usr/share/man/man3/termname.3 comp-c-man .man
23953./usr/share/man/man3/textdomain.3 comp-c-man .man 23956./usr/share/man/man3/textdomain.3 comp-c-man .man
23954./usr/share/man/man3/tfind.3 comp-c-man .man 23957./usr/share/man/man3/tfind.3 comp-c-man .man
23955./usr/share/man/man3/tgamma.3 comp-c-man .man 23958./usr/share/man/man3/tgamma.3 comp-c-man .man
23956./usr/share/man/man3/tgammaf.3 comp-c-man .man 23959./usr/share/man/man3/tgammaf.3 comp-c-man .man
23957./usr/share/man/man3/tgetent.3 comp-c-man .man 23960./usr/share/man/man3/tgetent.3 comp-c-man .man
23958./usr/share/man/man3/tgetflag.3 comp-c-man .man 23961./usr/share/man/man3/tgetflag.3 comp-c-man .man
23959./usr/share/man/man3/tgetnum.3 comp-c-man .man 23962./usr/share/man/man3/tgetnum.3 comp-c-man .man

cvs diff -r1.13 -r1.14 src/lib/libpthread_dbg/Attic/Makefile (expand / switch to unified diff)

--- src/lib/libpthread_dbg/Attic/Makefile 2016/11/21 22:19:03 1.13
+++ src/lib/libpthread_dbg/Attic/Makefile 2016/11/22 00:07:40 1.14
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.13 2016/11/21 22:19:03 kamil Exp $ 1# $NetBSD: Makefile,v 1.14 2016/11/22 00:07:40 kamil Exp $
2# 2#
3 3
4WARNS?= 5 4WARNS?= 5
5 5
6.include <bsd.own.mk> 6.include <bsd.own.mk>
7 7
8LIBPDIR= ${.CURDIR}/../libpthread 8LIBPDIR= ${.CURDIR}/../libpthread
9 9
10.if defined(PTHREAD_MACHINE_ARCH) && !empty(PTHREAD_MACHINE_ARCH) && \ 10.if defined(PTHREAD_MACHINE_ARCH) && !empty(PTHREAD_MACHINE_ARCH) && \
11 exists(${LIBPDIR}/arch/${PTHREAD_MACHINE_ARCH}) 11 exists(${LIBPDIR}/arch/${PTHREAD_MACHINE_ARCH})
12ARCHSUBDIR= ${PTHREAD_MACHINE_ARCH} 12ARCHSUBDIR= ${PTHREAD_MACHINE_ARCH}
13.elif exists(${LIBPDIR}/arch/${MACHINE_ARCH}) 13.elif exists(${LIBPDIR}/arch/${MACHINE_ARCH})
14ARCHSUBDIR= ${MACHINE_ARCH} 14ARCHSUBDIR= ${MACHINE_ARCH}
@@ -33,23 +33,24 @@ assym.h: genassym.sh ${ARCHDIR}/genassym @@ -33,23 +33,24 @@ assym.h: genassym.sh ${ARCHDIR}/genassym
33 ${GENASSYM_CPPFLAGS} < ${ARCHDIR}/genassym.cf > assym.h.tmp && \ 33 ${GENASSYM_CPPFLAGS} < ${ARCHDIR}/genassym.cf > assym.h.tmp && \
34 mv -f assym.h.tmp assym.h 34 mv -f assym.h.tmp assym.h
35 35
36SRCS= pthread_dbg.c  36SRCS= pthread_dbg.c
37 37
38CPPFLAGS+= -D__LIBPTHREAD_SOURCE__ 38CPPFLAGS+= -D__LIBPTHREAD_SOURCE__
39 39
40INCS= pthread_dbg.h 40INCS= pthread_dbg.h
41INCSDIR=/usr/include 41INCSDIR=/usr/include
42 42
43MAN+= pthread_dbg.3 43MAN+= pthread_dbg.3
44MAN+= td_open.3 44MAN+= td_open.3
45MAN+= td_thr_info.3 45MAN+= td_thr_info.3
 46MAN+= td_thr_iter.3
46 47
47MLINKS+= td_open.3 td_close.3 48MLINKS+= td_open.3 td_close.3
48 49
49.include <bsd.lib.mk> 50.include <bsd.lib.mk>
50 51
51.else 52.else
52 53
53.include <bsd.man.mk> 54.include <bsd.man.mk>
54 55
55.endif 56.endif

File Added: src/lib/libpthread_dbg/Attic/td_thr_iter.3
.\"	$NetBSD: td_thr_iter.3,v 1.1 2016/11/22 00:07:40 kamil Exp $
.\"
.\" Copyright (c) 2016 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd November 21, 2016
.Dt TD_THR_ITER 3
.Os
.Sh NAME
.Nm td_thr_iter
.Nd iterate over the threads in the process
.Sh LIBRARY
.Lb libpthread_dbg
.Sh SYNOPSIS
.In pthread_dbg.h
.Ft int
.Fn td_thr_iter "td_proc_t *proc" "int (*call)(td_thread_t *, void *)" "void *callarg"
.Sh DESCRIPTION
The
.Fn td_thr_iter
function iterates over all threads in the
.Fa proc
process and calls
.Fa call
function for each of them
with
.Fa callarg
argument.
.Sh RETURN VALUES
If successful, the
.Nm
function will return
.Dv TD_ERR_OK .
Otherwise an error number will be returned to indicate failure as described in
.Xr pthread_dbg 3 .
.Sh SEE ALSO
.Xr pthread 3 ,
.Xr pthread_dbg 3
.Sh HISTORY
The
.Nm
function first appeared in
.Nx 2.0 .
.Sh AUTHORS
.An Nathan J. Williams Aq Mt nathanw@NetBSD.org
.Pp
This manual page was written by
.An Kamil Rytarowski Aq Mt kamil@NetBSD.org .