Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpthread Improve wording describing the behavior of th...
details: https://anonhg.NetBSD.org/src/rev/a1fbf01e68d6
branches: trunk
changeset: 755477:a1fbf01e68d6
user: dholland <dholland%NetBSD.org@localhost>
date: Mon Jun 07 04:36:34 2010 +0000
description:
Improve wording describing the behavior of the attributes argument, and
add reference to pthread_attr(3), as requested in PR 42871. The text
added is different from but based on a suggestion by Matthew Mondor.
diffstat:
lib/libpthread/pthread_create.3 | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diffs (59 lines):
diff -r e11d7fa51b53 -r a1fbf01e68d6 lib/libpthread/pthread_create.3
--- a/lib/libpthread/pthread_create.3 Mon Jun 07 04:08:26 2010 +0000
+++ b/lib/libpthread/pthread_create.3 Mon Jun 07 04:36:34 2010 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pthread_create.3,v 1.5 2008/05/02 18:11:04 martin Exp $
+.\" $NetBSD: pthread_create.3,v 1.6 2010/06/07 04:36:34 dholland Exp $
.\"
.\" Copyright (c) 2002 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -54,7 +54,7 @@
.\"
.\" $FreeBSD: src/lib/libpthread/man/pthread_create.3,v 1.16 2002/09/16 19:29:28 mini Exp $
.\"
-.Dd January 30, 2003
+.Dd June 6, 2010
.Dt PTHREAD_CREATE 3
.Os
.Sh NAME
@@ -77,20 +77,29 @@
is
.Dv NULL ,
the default attributes are used.
-If the attribute object pointed to by
+.Pp
+The attributes specified via
+.Fa attr
+are copied into the new thread.
+Any subsequent modifications to the attributes object
.Fa attr
-are modified later, the thread's attributes are not affected.
+points to will have no effect upon already-created threads.
+It is thus also safe to pass the same
+.Fa attr
+to multiple calls to
+.Fn pthread_create .
+.Pp
Upon
successful completion
.Fn pthread_create
will store the ID of the created thread in the location specified by
.Fa thread .
-.Pp
The thread is created executing
.Fa start_routine
with
.Fa arg
as its sole argument.
+.Pp
If the
.Fa start_routine
returns, the effect is as if there was an implicit call to
@@ -138,6 +147,7 @@
.El
.Sh SEE ALSO
.Xr fork 2 ,
+.Xr pthread_attr 3 ,
.Xr pthread_cleanup_pop 3 ,
.Xr pthread_cleanup_push 3 ,
.Xr pthread_exit 3 ,
Home |
Main Index |
Thread Index |
Old Index