NetBSD Problem Report #42871
From www@NetBSD.org Tue Feb 23 05:18:47 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 9E89E63C594
for <gnats-bugs@gnats.NetBSD.org>; Tue, 23 Feb 2010 05:18:47 +0000 (UTC)
Message-Id: <20100223051847.3C34063C49F@www.NetBSD.org>
Date: Tue, 23 Feb 2010 05:18:47 +0000 (UTC)
From: ceh@update.uu.se
Reply-To: ceh@update.uu.se
To: gnats-bugs@NetBSD.org
Subject: pthread_create(3): improve wording and add a reference
X-Send-Pr-Version: www-1.0
>Number: 42871
>Category: misc
>Synopsis: pthread_create(3): improve wording and add a reference
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: misc-bug-people
>State: closed
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 23 05:20:00 +0000 2010
>Closed-Date: Mon Jun 07 07:14:48 +0000 2010
>Last-Modified: Mon Jun 07 07:14:48 +0000 2010
>Originator: Emil Hessman
>Release: NetBSD 5.0
>Organization:
>Environment:
>Description:
Improve wording of:
"If the attribute object pointed to by attr are modified later, the thread's attributes are not affected."
... to:
"If the attributes specified by attr are modified later, the thread's attributes are not affected."
Also add a reference to pthread_attr(3) while here.
>How-To-Repeat:
man 3 pthread_create
>Fix:
Index: pthread_create.3
===================================================================
RCS file: /cvsroot/src/lib/libpthread/pthread_create.3,v
retrieving revision 1.5
diff -u -r1.5 pthread_create.3
--- pthread_create.3 2 May 2008 18:11:04 -0000 1.5
+++ pthread_create.3 23 Feb 2010 05:05:42 -0000
@@ -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 February 23, 2010
.Dt PTHREAD_CREATE 3
.Os
.Sh NAME
@@ -77,7 +77,7 @@
is
.Dv NULL ,
the default attributes are used.
-If the attribute object pointed to by
+If the attributes specified by
.Fa attr
are modified later, the thread's attributes are not affected.
Upon
@@ -138,6 +138,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 ,
>Release-Note:
>Audit-Trail:
From: Matthew Mondor <mm_lists@pulsar-zone.net>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: misc/42871: pthread_create(3): improve wording and add a
reference
Date: Tue, 23 Feb 2010 00:45:20 -0500
On Tue, 23 Feb 2010 05:20:00 +0000 (UTC)
ceh@update.uu.se wrote:
> "If the attribute object pointed to by attr are modified later, the thread's attributes are not affected."
>
> ... to:
>
> "If the attributes specified by attr are modified later, the thread's attributes are not affected."
Unfortunately, I find "pointed to by attr" (attr is a pointer to a
pthread_attr_t object) to the more precise...
Or perhaps it'd even be good to specify that the attributes are copied
by pthread_create(3) such that changing them has no effect on already
created threads like the following (please correct as needed, or
suggest other alternatives):
"The attributes specified via the pthread_attr_t object, if any, are
copied for the new thread by pthread_create(3). Thus, if the attributes
object is modified after creating a thread, that thread's attributes
are not affected. It is also safe to reuse the same attributes object
to create multiple threads." ?
Thanks,
--
Matt
From: Emil Hessman <ceh@update.uu.se>
To: gnats-bugs@netbsd.org
Cc: misc-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: misc/42871: pthread_create(3): improve wording and add a
reference
Date: Tue, 23 Feb 2010 09:40:24 +0100
On Tue, Feb 23, 2010 at 06:50, Matthew Mondor <mm_lists@pulsar-zone.net> wr=
ote:
[...]
> =C2=A0Unfortunately, I find "pointed to by attr" (attr is a pointer to a
> =C2=A0pthread_attr_t object) to the more precise...
>
> =C2=A0Or perhaps it'd even be good to specify that the attributes are cop=
ied
> =C2=A0by pthread_create(3) such that changing them has no effect on alrea=
dy
> =C2=A0created threads like the following (please correct as needed, or
> =C2=A0suggest other alternatives):
>
> =C2=A0"The attributes specified via the pthread_attr_t object, if any, ar=
e
> =C2=A0copied for the new thread by pthread_create(3). =C2=A0Thus, if the =
attributes
> =C2=A0object is modified after creating a thread, that thread's attribute=
s
> =C2=A0are not affected. =C2=A0It is also safe to reuse the same attribute=
s object
> =C2=A0to create multiple threads." ?
Much better, clear as crystal.
Cheers,
-ceh
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/42871 CVS commit: src/lib/libpthread
Date: Mon, 7 Jun 2010 04:36:34 +0000
Module Name: src
Committed By: dholland
Date: Mon Jun 7 04:36:34 UTC 2010
Modified Files:
src/lib/libpthread: pthread_create.3
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libpthread/pthread_create.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 07 Jun 2010 05:04:11 +0000
State-Changed-Why:
Fixed in -current; I don't think -5 is interested in miscellaneous doc
fixes at this point.
State-Changed-From-To: closed->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 07 Jun 2010 05:04:45 +0000
State-Changed-Why:
On second thought, before I close it: do you find the wording I applied ok?
From: Emil Hessman <ceh@update.uu.se>
To: gnats-bugs@netbsd.org
Cc: misc-bug-people@netbsd.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org,
dholland@netbsd.org
Subject: Re: misc/42871 (pthread_create(3): improve wording and add a
reference)
Date: Mon, 7 Jun 2010 09:07:02 +0200
On Mon, Jun 7, 2010 at 07:04, <dholland@netbsd.org> wrote:
> Synopsis: pthread_create(3): improve wording and add a reference
>
> State-Changed-From-To: closed->feedback
> State-Changed-By: dholland@NetBSD.org
> State-Changed-When: Mon, 07 Jun 2010 05:04:45 +0000
> State-Changed-Why:
> On second thought, before I close it: do you find the wording I applied ok?
Yes. Brief and to the point.
Cheers,
-ceh
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 07 Jun 2010 07:14:48 +0000
State-Changed-Why:
Thanks.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.