Module Name: src Committed By: christos Date: Fri Aug 6 05:35:42 UTC 2010
Modified Files: src/lib/libpthread: Makefile pthread_attr_get_np.3 Log Message: document pthread_getattr_np To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/lib/libpthread/Makefile cvs rdiff -u -r1.3 -r1.4 src/lib/libpthread/pthread_attr_get_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/Makefile diff -u src/lib/libpthread/Makefile:1.69 src/lib/libpthread/Makefile:1.70 --- src/lib/libpthread/Makefile:1.69 Fri Jul 9 04:22:04 2010 +++ src/lib/libpthread/Makefile Fri Aug 6 01:35:42 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.69 2010/07/09 08:22:04 jruoho Exp $ +# $NetBSD: Makefile,v 1.70 2010/08/06 05:35:42 christos Exp $ # WARNS= 4 @@ -112,6 +112,7 @@ pthread_sigmask.3 pthread_spin.3 \ pthread_suspend_np.3 pthread_testcancel.3 +MLINKS+= pthread_attr_get_np.3 pthread_getattr_np.3 MLINKS+= affinity.3 pthread_setaffinity_np.3 MLINKS+= affinity.3 pthread_getaffinity_np.3 Index: src/lib/libpthread/pthread_attr_get_np.3 diff -u src/lib/libpthread/pthread_attr_get_np.3:1.3 src/lib/libpthread/pthread_attr_get_np.3:1.4 --- src/lib/libpthread/pthread_attr_get_np.3:1.3 Wed Jul 7 05:54:07 2010 +++ src/lib/libpthread/pthread_attr_get_np.3 Fri Aug 6 01:35:42 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: pthread_attr_get_np.3,v 1.3 2010/07/07 09:54:07 wiz Exp $ +.\" $NetBSD: pthread_attr_get_np.3,v 1.4 2010/08/06 05:35:42 christos Exp $ .\" .\" Copyright (c) 2010 Jukka Ruohonen <jruoho...@iki.fi> .\" All rights reserved. @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 6, 2010 +.Dd August 6, 2010 .Dt PTHREAD_ATTR_GET_NP 3 .Os .Sh NAME @@ -37,15 +37,30 @@ .In pthread.h .Ft int .Fn pthread_attr_get_np "pthread_t thread" "pthread_attr_t *attr" +.Ft int +.Fn pthread_getattr_np "pthread_t thread" "pthread_attr_t *attr" .Sh DESCRIPTION The .Fn pthread_attr_get_np -function can be used to retrieve attributes of a running +and +.Fn pthread_getattr_np +functions can be used to retrieve attributes of a running .Fa thread . The result is stored to -.Fa attr , -which should be initialized prior to the call by using +.Fa attr . +.Pp +For +.Fn pthread_attr_get_np +.Fa attr +should be initialized prior to the call by using .Xr pthread_attr_init 3 . +.Fn pthread_getattr_np +does this automatically. +.Pp +For both functions +.Fa attr +should be freed when it is not in use anymore with +.Xr pthread_attr_destroy 3 . .Pp Most fields of .Fa attr @@ -78,16 +93,22 @@ .Sh RETURN VALUES Upon successful completion, .Fn pthread_attr_get_np -returns 0. +and +.Fn pthread_getattr_np +return 0. Otherwise an error number is returned to indicate the error. .Sh COMPATIBILITY The .Fn pthread_attr_get_np -function is a non-standard extension. +and +.Fn pthread_getattr_np +functions are non-standard extensions. .Sh ERRORS The .Fn pthread_attr_get_np -function will fail if: +and +.Fn pthread_getattr_np +functions will fail if: .Bl -tag -width Er .It Bq Er ENOMEM Insufficient memory.