Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Document td_thr_getname(3) from libpthread_dbg(3)



details:   https://anonhg.NetBSD.org/src/rev/e3b415ef86c8
branches:  trunk
changeset: 819203:e3b415ef86c8
user:      kamil <kamil%NetBSD.org@localhost>
date:      Tue Nov 22 01:49:36 2016 +0000

description:
Document td_thr_getname(3) from libpthread_dbg(3)

td_thr_getname - get the user-assigned name of a thread

Sponsored by <The NetBSD Foundation>

diffstat:

 distrib/sets/lists/comp/mi          |   5 ++-
 lib/libpthread_dbg/Makefile         |   3 +-
 lib/libpthread_dbg/pthread_dbg.3    |  13 +++---
 lib/libpthread_dbg/td_thr_getname.3 |  74 +++++++++++++++++++++++++++++++++++++
 4 files changed, 87 insertions(+), 8 deletions(-)

diffs (156 lines):

diff -r 15c82f276231 -r e3b415ef86c8 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi        Tue Nov 22 01:34:41 2016 +0000
+++ b/distrib/sets/lists/comp/mi        Tue Nov 22 01:49:36 2016 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mi,v 1.2072 2016/11/22 00:07:40 kamil Exp $
+#      $NetBSD: mi,v 1.2073 2016/11/22 01:49:36 kamil Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.comp                           comp-sys-root
@@ -9364,6 +9364,7 @@
 ./usr/share/man/cat3/tcsetpgrp.0               comp-c-catman           .cat
 ./usr/share/man/cat3/td_close.0                        comp-c-catman           .cat
 ./usr/share/man/cat3/td_open.0                 comp-c-catman           .cat
+./usr/share/man/cat3/td_thr_getname.0          comp-c-catman           .cat
 ./usr/share/man/cat3/td_thr_info.0             comp-c-catman           .cat
 ./usr/share/man/cat3/td_thr_iter.0             comp-c-catman           .cat
 ./usr/share/man/cat3/tdelete.0                 comp-c-catman           .cat
@@ -16624,6 +16625,7 @@
 ./usr/share/man/html3/tcsetpgrp.html           comp-c-htmlman          html
 ./usr/share/man/html3/td_close.html            comp-c-htmlman          html
 ./usr/share/man/html3/td_open.html             comp-c-htmlman          html
+./usr/share/man/html3/td_thr_getname.html      comp-c-htmlman          html
 ./usr/share/man/html3/td_thr_info.html         comp-c-htmlman          html
 ./usr/share/man/html3/td_thr_iter.html         comp-c-htmlman          html
 ./usr/share/man/html3/tdelete.html             comp-c-htmlman          html
@@ -23945,6 +23947,7 @@
 ./usr/share/man/man3/tcsetpgrp.3               comp-c-man              .man
 ./usr/share/man/man3/td_close.3                        comp-c-man              .man
 ./usr/share/man/man3/td_open.3                 comp-c-man              .man
+./usr/share/man/man3/td_thr_getname.3          comp-c-man              .man
 ./usr/share/man/man3/td_thr_info.3             comp-c-man              .man
 ./usr/share/man/man3/td_thr_iter.3             comp-c-man              .man
 ./usr/share/man/man3/tdelete.3                 comp-c-man              .man
diff -r 15c82f276231 -r e3b415ef86c8 lib/libpthread_dbg/Makefile
--- a/lib/libpthread_dbg/Makefile       Tue Nov 22 01:34:41 2016 +0000
+++ b/lib/libpthread_dbg/Makefile       Tue Nov 22 01:49:36 2016 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.14 2016/11/22 00:07:40 kamil Exp $
+#      $NetBSD: Makefile,v 1.15 2016/11/22 01:49:36 kamil Exp $
 #
 
 WARNS?=                5
@@ -42,6 +42,7 @@
 
 MAN+=  pthread_dbg.3
 MAN+=  td_open.3
+MAN+=  td_thr_getname.3
 MAN+=  td_thr_info.3
 MAN+=  td_thr_iter.3
 
diff -r 15c82f276231 -r e3b415ef86c8 lib/libpthread_dbg/pthread_dbg.3
--- a/lib/libpthread_dbg/pthread_dbg.3  Tue Nov 22 01:34:41 2016 +0000
+++ b/lib/libpthread_dbg/pthread_dbg.3  Tue Nov 22 01:49:36 2016 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: pthread_dbg.3,v 1.1 2016/11/21 20:43:25 kamil Exp $
+.\"    $NetBSD: pthread_dbg.3,v 1.2 2016/11/22 01:49:36 kamil Exp $
 .\"
 .\"
 .\" Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -102,12 +102,13 @@
 The following functions comprise the core of the
 .Nm
 library:
-.Bl -column -offset indent "td_thr_info(3)" "XXX"
+.Bl -column -offset indent "td_thr_getname(3)" "iterate over the threads in the process"
 .It Sy Function Ta Sy Description
-.It Xr td_close 3 Ta close connection to a threaded process
-.It Xr td_open 3 Ta make connection to a threaded process
-.It Xr td_thr_info 3 Ta get information on a thread
-.It Xr td_thr_iter 3 Ta iterate over the threads in the process
+.It Xr td_close 3       Ta close connection to a threaded process
+.It Xr td_open 3        Ta make connection to a threaded process
+.It Xr td_thr_getname 3 Ta get the user-assigned name of a thread
+.It Xr td_thr_info 3    Ta get information on a thread
+.It Xr td_thr_iter 3    Ta iterate over the threads in the process
 .El
 .Sh SEE ALSO
 .Xr pthread 3
diff -r 15c82f276231 -r e3b415ef86c8 lib/libpthread_dbg/td_thr_getname.3
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libpthread_dbg/td_thr_getname.3       Tue Nov 22 01:49:36 2016 +0000
@@ -0,0 +1,74 @@
+.\"    $NetBSD: td_thr_getname.3,v 1.1 2016/11/22 01:49:36 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 22, 2016
+.Dt TD_THR_GETNAME 3
+.Os
+.Sh NAME
+.Nm td_thr_getname
+.Nd get the user-assigned name of a thread
+.Sh LIBRARY
+.Lb libpthread_dbg
+.Sh SYNOPSIS
+.In pthread_dbg.h
+.Ft int
+.Fn td_thr_getname "td_thread_t *thread" "char *name" "int len"
+.Sh DESCRIPTION
+The
+.Nm
+function retrieves user-assigned name of a thread
+.Fa thread
+and stores it in buffer
+.Fa name
+of length
+.Fa len .
+If a name is longer than buffer size, the result will be truncated.
+The returned string always terminates with
+.Dv NUL
+byte.
+The maximum length of a thread's name,
+including terminating character is defined by
+.Dv PTHREAD_MAX_NAMELEN_NP .
+.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@localhost
+.Pp
+This manual page was written by
+.An Kamil Rytarowski Aq Mt kamil%NetBSD.org@localhost .



Home | Main Index | Thread Index | Old Index