Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpthread_dbg Various fixes.
details: https://anonhg.NetBSD.org/src/rev/5a417b39732e
branches: trunk
changeset: 349116:5a417b39732e
user: wiz <wiz%NetBSD.org@localhost>
date: Thu Nov 24 12:18:02 2016 +0000
description:
Various fixes.
diffstat:
lib/libpthread_dbg/pthread_dbg.3 | 17 +++++++++--------
lib/libpthread_dbg/td_map_pth2thr.3 | 9 +++++----
lib/libpthread_dbg/td_open.3 | 16 ++++++++--------
lib/libpthread_dbg/td_thr_getname.3 | 13 +++++++------
lib/libpthread_dbg/td_thr_info.3 | 18 +++++++++---------
lib/libpthread_dbg/td_thr_iter.3 | 10 +++++-----
6 files changed, 43 insertions(+), 40 deletions(-)
diffs (truncated from 308 to 300 lines):
diff -r 19646c835418 -r 5a417b39732e lib/libpthread_dbg/pthread_dbg.3
--- a/lib/libpthread_dbg/pthread_dbg.3 Thu Nov 24 12:06:43 2016 +0000
+++ b/lib/libpthread_dbg/pthread_dbg.3 Thu Nov 24 12:18:02 2016 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pthread_dbg.3,v 1.3 2016/11/22 03:52:01 kamil Exp $
+.\" $NetBSD: pthread_dbg.3,v 1.4 2016/11/24 12:18:02 wiz Exp $
.\"
.\"
.\" Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -62,12 +62,12 @@
releases, programs must be linked against the dynamic version of the
thread library.
Statically linked programs using the
-.Tn POSIX
+.Tn POSIX
threads framework may not work when run on a future version of the system.
.Pp
The
.Nm
-library is designed to be used in debuggers and to control and introspect
+library is designed to be used in debuggers and to control and introspect the
.Nx
implementation of the
.Tn POSIX
@@ -75,7 +75,7 @@
Software may use native
.Tn LWP
threads without
-.Xr libpthread 3
+.Xr pthread 3
layer,
in that case
.Nm
@@ -105,8 +105,8 @@
.Bl -column -offset indent "td_thr_getname(3)" "convert the pthread_t to a thread handle"
.It Sy Function Ta Sy Description
.It Xr td_close 3 Ta close connection to a threaded process
+.It Xr td_map_pth2thr 3 Ta convert a pthread_t to a thread handle
.It Xr td_open 3 Ta make connection to a threaded process
-.It Xr td_map_pth2thr 3 Ta convert the pthread_t to a thread handle
.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
@@ -116,7 +116,7 @@
.Sh STANDARDS
The
.Nm
-library is
+library is a
.Nx
extension.
.Sh HISTORY
@@ -124,7 +124,7 @@
.Nm
library first appeared in
.Nx 2.0
-along with Scheduler Activation thread interface.
+along with the Scheduler Activation thread interface.
This interface was authored by
.An Nathan J. Williams
and merged by
@@ -133,8 +133,9 @@
.Nx 5.0
the
.Nm
-library was moved to new 1:1 thread model.
+library was moved to the new 1:1 thread model.
.Sh AUTHORS
+.An -nosplit
.An Nathan J. Williams Aq Mt nathanw%NetBSD.org@localhost
.Pp
This manual page was written by
diff -r 19646c835418 -r 5a417b39732e lib/libpthread_dbg/td_map_pth2thr.3
--- a/lib/libpthread_dbg/td_map_pth2thr.3 Thu Nov 24 12:06:43 2016 +0000
+++ b/lib/libpthread_dbg/td_map_pth2thr.3 Thu Nov 24 12:18:02 2016 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: td_map_pth2thr.3,v 1.1 2016/11/22 03:52:01 kamil Exp $
+.\" $NetBSD: td_map_pth2thr.3,v 1.2 2016/11/24 12:18:02 wiz Exp $
.\"
.\" Copyright (c) 2016 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -29,7 +29,7 @@
.Os
.Sh NAME
.Nm td_map_pth2thr
-.Nd convert the pthread_t to a thread handle
+.Nd convert a pthread_t to a thread handle
.Sh LIBRARY
.Lb libpthread_dbg
.Sh SYNOPSIS
@@ -39,11 +39,11 @@
.Sh DESCRIPTION
The
.Nm
-function converts
+function converts a
.Ta POSIX
thread
.Fa thread
-to
+to a
.Xr pthread_dbg 3
specific thread passed in the
.Fa threadp
@@ -64,6 +64,7 @@
function first appeared in
.Nx 2.0 .
.Sh AUTHORS
+.An -nosplit
.An Nathan J. Williams Aq Mt nathanw%NetBSD.org@localhost
.Pp
This manual page was written by
diff -r 19646c835418 -r 5a417b39732e lib/libpthread_dbg/td_open.3
--- a/lib/libpthread_dbg/td_open.3 Thu Nov 24 12:06:43 2016 +0000
+++ b/lib/libpthread_dbg/td_open.3 Thu Nov 24 12:18:02 2016 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: td_open.3,v 1.1 2016/11/21 20:43:25 kamil Exp $
+.\" $NetBSD: td_open.3,v 1.2 2016/11/24 12:18:02 wiz Exp $
.\"
.\" Copyright (c) 2016 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -24,14 +24,13 @@
.\" 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_OPEN 3
.Os
.Sh NAME
-.Nm td_open
+.Nm td_open ,
.Nm td_close
-.Nd make a conection to a threaded process
+.Nd make or close a connection to a threaded process
.Sh LIBRARY
.Lb libpthread_dbg
.Sh SYNOPSIS
@@ -44,15 +43,15 @@
The
.Fn td_open
function makes a connection to a threaded process.
-That program must be a consumer of
+That program must be a consumer of the
.Tn POSIX
-threads implementation with the
-.Xr libpthreads 3
+threads implementation using the
+.Xr pthread 3
library.
.Pp
The
.Fn td_close
-function closes connection to a threaded process.
+function closes a connection to a threaded process.
.Sh RETURN VALUES
If successful, the
.Fn td_open
@@ -73,6 +72,7 @@
functions first appeared in
.Nx 2.0 .
.Sh AUTHORS
+.An -nosplit
.An Nathan J. Williams Aq Mt nathanw%NetBSD.org@localhost
.Pp
This manual page was written by
diff -r 19646c835418 -r 5a417b39732e lib/libpthread_dbg/td_thr_getname.3
--- a/lib/libpthread_dbg/td_thr_getname.3 Thu Nov 24 12:06:43 2016 +0000
+++ b/lib/libpthread_dbg/td_thr_getname.3 Thu Nov 24 12:18:02 2016 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: td_thr_getname.3,v 1.1 2016/11/22 01:49:36 kamil Exp $
+.\" $NetBSD: td_thr_getname.3,v 1.2 2016/11/24 12:18:02 wiz Exp $
.\"
.\" Copyright (c) 2016 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -39,18 +39,18 @@
.Sh DESCRIPTION
The
.Nm
-function retrieves user-assigned name of a thread
+function retrieves the user-assigned name of a thread
.Fa thread
-and stores it in buffer
+and stores it in the 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
+If the name is longer than the buffer size, the result will be truncated.
+The returned string always terminates with a
.Dv NUL
byte.
The maximum length of a thread's name,
-including terminating character is defined by
+including terminating character, is defined by
.Dv PTHREAD_MAX_NAMELEN_NP .
.Sh RETURN VALUES
If successful, the
@@ -68,6 +68,7 @@
function first appeared in
.Nx 2.0 .
.Sh AUTHORS
+.An -nosplit
.An Nathan J. Williams Aq Mt nathanw%NetBSD.org@localhost
.Pp
This manual page was written by
diff -r 19646c835418 -r 5a417b39732e lib/libpthread_dbg/td_thr_info.3
--- a/lib/libpthread_dbg/td_thr_info.3 Thu Nov 24 12:06:43 2016 +0000
+++ b/lib/libpthread_dbg/td_thr_info.3 Thu Nov 24 12:18:02 2016 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: td_thr_info.3,v 1.1 2016/11/21 22:19:03 kamil Exp $
+.\" $NetBSD: td_thr_info.3,v 1.2 2016/11/24 12:18:02 wiz Exp $
.\"
.\" Copyright (c) 2016 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -41,20 +41,19 @@
.Fn td_thr_info
function retrieves information on a thread specified in the
.Fa thread
-argument
-and saves the result in
+argument and saves the result in
.Fa info .
.Pp
-In the
+The following members are defined in the
.Dv td_thread_info_t
-structure there are defined the following members:
+structure:
.Bl -column "thread_state" "caddr_t" "Pointer to underlaying Dv pthread_t object"
.It Sy Name Ta Sy Type Ta Sy Description
.It thread_addr Ta Dv caddr_t Ta Points to underlaying Dv pthread_t object
.It thread_state Ta Dv int Ta Defines Dv TD_STATE of the thread
.\" TODO: Add ATF tests, verify and document:
.\" thread_type
-.\" thread_id
+.\" thread_id
.\" thread_stack
.\" thread_hasjoiners
.\" thread_tls
@@ -73,8 +72,8 @@
.It Dv TD_STATE_DEAD Ta "Thread is dead"
.El
.Pp
-It is not possible to retrieve with this interface information whether a thread
-is suspended or resumed,
+It is not possible to retrieve information whether a thread
+is suspended or resumed using this interface,
as this data is stored only inside the kernel and not in the
.Dv pthread_t
object.
@@ -83,7 +82,7 @@
name is kept for backwards compatibility with old Scheduler Activation threads.
The
.Dv TD_STATE_RUNNING
-state might be returned only for mismatch between versions of
+state might only be returned for a mismatch between the versions of
.Xr pthread 3
and
.Xr pthread_dbg 3 .
@@ -103,6 +102,7 @@
function first appeared in
.Nx 2.0 .
.Sh AUTHORS
+.An -nosplit
.An Nathan J. Williams Aq Mt nathanw%NetBSD.org@localhost
.Pp
This manual page was written by
diff -r 19646c835418 -r 5a417b39732e lib/libpthread_dbg/td_thr_iter.3
--- a/lib/libpthread_dbg/td_thr_iter.3 Thu Nov 24 12:06:43 2016 +0000
+++ b/lib/libpthread_dbg/td_thr_iter.3 Thu Nov 24 12:18:02 2016 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: td_thr_iter.3,v 1.1 2016/11/22 00:07:40 kamil Exp $
+.\" $NetBSD: td_thr_iter.3,v 1.2 2016/11/24 12:18:02 wiz Exp $
.\"
.\" Copyright (c) 2016 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -29,7 +29,7 @@
.Os
.Sh NAME
.Nm td_thr_iter
-.Nd iterate over the threads in the process
+.Nd iterate over the threads in a process
.Sh LIBRARY
.Lb libpthread_dbg
.Sh SYNOPSIS
@@ -41,10 +41,9 @@
.Fn td_thr_iter
function iterates over all threads in the
.Fa proc
-process and calls
+process and calls the
.Fa call
-function for each of them
-with
+function for each of them with the
.Fa callarg
argument.
.Sh RETURN VALUES
Home |
Main Index |
Thread Index |
Old Index