Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libpthread Fix some minor errors/typos and clarify.



details:   https://anonhg.NetBSD.org/src/rev/b49fa03d3569
branches:  trunk
changeset: 756155:b49fa03d3569
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Wed Jul 07 12:49:15 2010 +0000

description:
Fix some minor errors/typos and clarify.

diffstat:

 lib/libpthread/pthread_attr_getstack.3 |  18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diffs (52 lines):

diff -r 9c178e4e564c -r b49fa03d3569 lib/libpthread/pthread_attr_getstack.3
--- a/lib/libpthread/pthread_attr_getstack.3    Wed Jul 07 12:43:18 2010 +0000
+++ b/lib/libpthread/pthread_attr_getstack.3    Wed Jul 07 12:49:15 2010 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: pthread_attr_getstack.3,v 1.1 2010/07/07 11:04:54 jruoho Exp $
+.\"    $NetBSD: pthread_attr_getstack.3,v 1.2 2010/07/07 12:49:15 jruoho Exp $
 .\"
 .\" Copyright (c) 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
 .\" All rights reserved.
@@ -84,7 +84,7 @@
 .Fa stackaddr
 and
 .Fa stacksize
-are both readable and writable by the thread.
+should be both readable and writable by the thread.
 .Pp
 The behavior is undefined in all functions if the
 .Fa attr
@@ -123,10 +123,13 @@
 If the application modifies the stack address, it claims also
 the responsibility of allocating the stack area and guarding it against
 possible stack overflow.
-This implies that the application may need to also allocate a suitable
-guard area that is protected from reading and writing.
+No default guard area will be allocated (see
+.Xr pthread_attr_getguardsize 3 ) .
+It may be necessary to manually use
+.Xr mprotect 2
+in order to define a guard area at the end of the allocated stack.
 .It
-Moreoever, if
+Moreover, if
 .Fa attr
 is used to create multiple threads, the stack address must be changed
 by the application between successive calls to
@@ -155,7 +158,8 @@
 or exceeds some system-imposed limit.
 .El
 .Sh SEE ALSO
-.Xr pthread_attr 3
+.Xr pthread_attr 3 ,
+.Xr pthread_attr_setguardsize 3
 .Sh STANDARDS
 The
 .Fn pthread_attr_getstack
@@ -173,5 +177,5 @@
 .Fn pthread_attr_setstackaddr
 conform to
 .St -p1003.1-2004 ,
-where these were marked as obsolescent due concerns about portability.
+where these were marked as obsolescent.
 The 2008 revision removed these two functions from the specification.



Home | Main Index | Thread Index | Old Index