Module Name:    src
Committed By:   jruoho
Date:           Tue Jul  6 21:54:13 UTC 2010

Modified Files:
        src/lib/libpthread: pthread_getname_np.3 pthread_setname_np.3

Log Message:
Fix LIBRARY. Add ERRORS and COMPATIBILITY. And some small improvements.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libpthread/pthread_getname_np.3
cvs rdiff -u -r1.2 -r1.3 src/lib/libpthread/pthread_setname_np.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libpthread/pthread_getname_np.3
diff -u src/lib/libpthread/pthread_getname_np.3:1.1 src/lib/libpthread/pthread_getname_np.3:1.2
--- src/lib/libpthread/pthread_getname_np.3:1.1	Fri Dec 14 21:51:22 2007
+++ src/lib/libpthread/pthread_getname_np.3	Tue Jul  6 21:54:12 2010
@@ -1,4 +1,4 @@
-.\"     $NetBSD: pthread_getname_np.3,v 1.1 2007/12/14 21:51:22 yamt Exp $
+.\"     $NetBSD: pthread_getname_np.3,v 1.2 2010/07/06 21:54:12 jruoho Exp $
 .\"
 .\" Copyright (c)2007 YAMAMOTO Takashi,
 .\" All rights reserved.
@@ -25,7 +25,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" ------------------------------------------------------------
-.Dd December 15, 2007
+.Dd July 7, 2010
 .Dt PTHREAD_GETNAME_NP 3
 .Os
 .Sh NAME
@@ -33,7 +33,7 @@
 .Nd set descriptive name of a thread
 .\" ------------------------------------------------------------
 .Sh LIBRARY
-.Lb libc
+.Lb libpthread
 .\" ------------------------------------------------------------
 .Sh SYNOPSIS
 .In pthread.h
@@ -41,10 +41,11 @@
 .Fn pthread_getname_np "pthread_t thread" "char *name" "size_t len"
 .\" ------------------------------------------------------------
 .Sh DESCRIPTION
+The
 .Fn pthread_getname_np
-gets the descriptive name of the thread.
-It takes the following arguments.
-.Bl -tag -width target
+function obtains the descriptive name of a thread.
+It takes the following arguments:
+.Bl -tag -width target -offset indent
 .It Fa thread
 The thread whose descriptive name will be obtained.
 .It Fa name
@@ -55,16 +56,28 @@
 in bytes.
 .El
 .\" ------------------------------------------------------------
-.Sh RETURN VALUES
-.Fn pthread_getname_np
-returns 0 on success.
-Otherwise,
+.Sh COMPATIBILITY
+The
 .Fn pthread_getname_np
-returns an error number described in
-.Xr errno 2 .
+function is a non-standard extension.
 .\" ------------------------------------------------------------
-.\".Sh ERRORS
+.Sh RETURN VALUES
+The
+.Fn pthread_getname_np
+function returns 0 on success.
+Otherwise, an error number is returned to indicate the error.
 .\" ------------------------------------------------------------
+.Sh ERRORS
+The
+.Fn pthread_getname_np
+function will fail if:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+Invalid parameter.
+.It Bq Er ESRCH
+Non-existent
+.Fa thread .
+.El
 .Sh SEE ALSO
-.Xr errno 2 ,
+.Xr pthread_attr_get_np 3 ,
 .Xr pthread_setname_np 3

Index: src/lib/libpthread/pthread_setname_np.3
diff -u src/lib/libpthread/pthread_setname_np.3:1.2 src/lib/libpthread/pthread_setname_np.3:1.3
--- src/lib/libpthread/pthread_setname_np.3:1.2	Mon May 26 08:43:41 2008
+++ src/lib/libpthread/pthread_setname_np.3	Tue Jul  6 21:54:12 2010
@@ -1,4 +1,4 @@
-.\"     $NetBSD: pthread_setname_np.3,v 1.2 2008/05/26 08:43:41 wiz Exp $
+.\"     $NetBSD: pthread_setname_np.3,v 1.3 2010/07/06 21:54:12 jruoho Exp $
 .\"
 .\" Copyright (c)2007 YAMAMOTO Takashi,
 .\" All rights reserved.
@@ -25,7 +25,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" ------------------------------------------------------------
-.Dd December 15, 2007
+.Dd July 7, 2010
 .Dt PTHREAD_SETNAME_NP 3
 .Os
 .Sh NAME
@@ -33,7 +33,7 @@
 .Nd set descriptive name of a thread
 .\" ------------------------------------------------------------
 .Sh LIBRARY
-.Lb libc
+.Lb libpthread
 .\" ------------------------------------------------------------
 .Sh SYNOPSIS
 .In pthread.h
@@ -41,10 +41,11 @@
 .Fn pthread_setname_np "pthread_t thread" "const char *name" "void *arg"
 .\" ------------------------------------------------------------
 .Sh DESCRIPTION
+The
 .Fn pthread_setname_np
-sets the descriptive name of the thread.
-It takes the following arguments.
-.Bl -tag -width target
+function sets the descriptive name of a thread.
+It takes the following arguments:
+.Bl -tag -width target -offset indent
 .It Fa thread
 The thread whose descriptive name will be set.
 .It Fa name
@@ -60,16 +61,31 @@
 .Fa name .
 .El
 .\" ------------------------------------------------------------
+.Sh COMPATIBILITY
+The
+.Fn pthread_setname_np
+function is a non-standard extension.
+.\" ------------------------------------------------------------
 .Sh RETURN VALUES
+The
 .Fn pthread_setname_np
-returns 0 on success.
+function returns 0 on success.
 Otherwise,
-.Fn pthread_setname_np
-returns an error number described in
-.Xr errno 2 .
-.\" ------------------------------------------------------------
-.\".Sh ERRORS
+an error number is returned to indicate the error.
 .\" ------------------------------------------------------------
+.Sh ERRORS
+The
+.Fn pthread_setname_np
+function will fail if:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+Invalid parameter.
+.It Bq Er ENOMEM
+Insufficient memory.
+.It Bq Er ESRCH
+Non-existent
+.Fa thread .
+.El
 .Sh SEE ALSO
-.Xr errno 2 ,
+.Xr pthread 3 ,
 .Xr pthread_getname_np 3

Reply via email to