Module Name: src Committed By: jruoho Date: Wed Jul 7 12:49:15 UTC 2010
Modified Files: src/lib/libpthread: pthread_attr_getstack.3 Log Message: Fix some minor errors/typos and clarify. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libpthread/pthread_attr_getstack.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_attr_getstack.3 diff -u src/lib/libpthread/pthread_attr_getstack.3:1.1 src/lib/libpthread/pthread_attr_getstack.3:1.2 --- src/lib/libpthread/pthread_attr_getstack.3:1.1 Wed Jul 7 11:04:54 2010 +++ src/lib/libpthread/pthread_attr_getstack.3 Wed Jul 7 12:49:15 2010 @@ -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 <jruoho...@iki.fi> .\" 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.