diff options
Diffstat (limited to 'lib/libpthread/man')
-rw-r--r-- | lib/libpthread/man/Makefile.inc | 4 | ||||
-rw-r--r-- | lib/libpthread/man/pthread_attr_init.3 | 5 | ||||
-rw-r--r-- | lib/libpthread/man/pthread_attr_setdetachstate.3 | 5 | ||||
-rw-r--r-- | lib/libpthread/man/pthread_attr_setguardsize.3 | 89 | ||||
-rw-r--r-- | lib/libpthread/man/pthread_attr_setstack.3 | 5 | ||||
-rw-r--r-- | lib/libpthread/man/pthread_attr_setstackaddr.3 | 5 | ||||
-rw-r--r-- | lib/libpthread/man/pthread_attr_setstacksize.3 | 5 | ||||
-rw-r--r-- | lib/libpthread/man/pthread_create.3 | 5 | ||||
-rw-r--r-- | lib/libpthread/man/pthreads.3 | 9 |
9 files changed, 117 insertions, 15 deletions
diff --git a/lib/libpthread/man/Makefile.inc b/lib/libpthread/man/Makefile.inc index bfa2dbda449..327457260ac 100644 --- a/lib/libpthread/man/Makefile.inc +++ b/lib/libpthread/man/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.22 2008/07/05 08:03:57 guenther Exp $ +# $OpenBSD: Makefile.inc,v 1.23 2008/12/18 09:30:32 guenther Exp $ # $FreeBSD: Makefile.inc,v 1.6 1999/08/28 00:03:02 peter Exp $ # POSIX thread man files @@ -11,6 +11,7 @@ MAN+= \ pthread_attr_setstack.3 \ pthread_attr_setstackaddr.3 \ pthread_attr_setstacksize.3 \ + pthread_attr_setguardsize.3 \ pthread_attr_setdetachstate.3 \ pthread_cleanup_pop.3 \ pthread_cleanup_push.3 \ @@ -85,6 +86,7 @@ MLINKS+=flockfile.3 funlockfile.3 \ pthread_attr_setstack.3 pthread_attr_getstack.3 \ pthread_attr_setstackaddr.3 pthread_attr_getstackaddr.3 \ pthread_attr_setstacksize.3 pthread_attr_getstacksize.3 \ + pthread_attr_setguardsize.3 pthread_attr_getguardsize.3 \ pthread_attr_setdetachstate.3 pthread_attr_getdetachstate.3 \ pthread_mutexattr.3 pthread_mutexattr_init.3 \ pthread_mutexattr.3 pthread_mutexattr_destroy.3 \ diff --git a/lib/libpthread/man/pthread_attr_init.3 b/lib/libpthread/man/pthread_attr_init.3 index 10351aabf1f..7dff56d4b1e 100644 --- a/lib/libpthread/man/pthread_attr_init.3 +++ b/lib/libpthread/man/pthread_attr_init.3 @@ -1,9 +1,9 @@ -.\" $OpenBSD: pthread_attr_init.3,v 1.9 2008/07/05 10:43:07 jmc Exp $ +.\" $OpenBSD: pthread_attr_init.3,v 1.10 2008/12/18 09:30:32 guenther Exp $ .\" Manual page derived from TOG's UNIX98 documentation. .\" .\" David Leonard, 2000. Public Domain. .\" -.Dd $Mdocdate: July 5 2008 $ +.Dd $Mdocdate: December 18 2008 $ .Dt PTHREAD_ATTR_INIT 3 .Os .Sh NAME @@ -65,6 +65,7 @@ These functions will not return an error code of .Bq Er EINTR . .Sh SEE ALSO .Xr pthread_attr_setdetachstate 3 , +.Xr pthread_attr_setguardsize 3 , .Xr pthread_attr_setstack 3 , .Xr pthread_attr_setstackaddr 3 , .Xr pthread_attr_setstacksize 3 , diff --git a/lib/libpthread/man/pthread_attr_setdetachstate.3 b/lib/libpthread/man/pthread_attr_setdetachstate.3 index 6fe3a88229d..fa27a96e7c5 100644 --- a/lib/libpthread/man/pthread_attr_setdetachstate.3 +++ b/lib/libpthread/man/pthread_attr_setdetachstate.3 @@ -1,9 +1,9 @@ -.\" $OpenBSD: pthread_attr_setdetachstate.3,v 1.8 2008/07/05 08:03:57 guenther Exp $ +.\" $OpenBSD: pthread_attr_setdetachstate.3,v 1.9 2008/12/18 09:30:32 guenther Exp $ .\" Manual page derived from TOG's UNIX98 documentation. .\" .\" David Leonard, 2000. Public Domain. .\" -.Dd $Mdocdate: July 5 2008 $ +.Dd $Mdocdate: December 18 2008 $ .Dt PTHREAD_ATTR_SETDETACHSTATE 3 .Os .Sh NAME @@ -90,6 +90,7 @@ These functions will not return an error code of .Bq Er EINTR . .Sh SEE ALSO .Xr pthread_attr_init 3 , +.Xr pthread_attr_setguardsize 3 , .Xr pthread_attr_setstack 3 , .Xr pthread_attr_setstackaddr 3 , .Xr pthread_attr_setstacksize 3 , diff --git a/lib/libpthread/man/pthread_attr_setguardsize.3 b/lib/libpthread/man/pthread_attr_setguardsize.3 new file mode 100644 index 00000000000..471def58d61 --- /dev/null +++ b/lib/libpthread/man/pthread_attr_setguardsize.3 @@ -0,0 +1,89 @@ +.\" $OpenBSD: pthread_attr_setguardsize.3,v 1.1 2008/12/18 09:30:32 guenther Exp $ +.\" Manual page derived from TOG's XPG6 documentation. +.\" +.\" David Leonard, 2000. Public Domain. +.\" +.Dd $Mdocdate: December 18 2008 $ +.Dt PTHREAD_ATTR_SETGUARDSIZE 3 +.Os +.Sh NAME +.Nm pthread_attr_setguardsize , +.Nm pthread_attr_getguardsize +.Nd set and get guardsize attribute +.Sh SYNOPSIS +.Fd #include <pthread.h> +.Ft int +.Fn pthread_attr_setguardsize "pthread_attr_t *attr" "size_t guardsize" +.Ft int +.Fn pthread_attr_getguardsize "const pthread_attr_t *attr" "size_t *guardsize" +.Sh DESCRIPTION +The functions +.Fn pthread_attr_setguardsize +and +.Fn pthread_attr_getguardsize , +respectively, set and get the thread +creation +.Va guardsize +attribute in the +.Fa attr +object. +If +.Va guardsize +is zero, +a guard area shall not be provided for threads created with +.Fa attr . +If +.Va guardsize +is greater than zero, +a guard area of at least size +.Va guardsize +bytes shall be provided for each thread created with +.Fa attr . +.Pp +The +.Va guardsize +attribute controls the size of the guard area for the created +thread's stack. +The +.Va guardsize +attribute provides protection against overflow of the stack pointer. +If a thread's stack is created with guard protection, +the implementation allocates extra memory at the overflow end of +the stack as a buffer against stack overflow of the stack pointer. +If an application overflows into this buffer an error shall result +(possibly in a SIGSEGV signal being delivered to the thread). +.Sh RETURN VALUES +Upon successful completion, +.Fn pthread_attr_setguardsize +and +.Fn pthread_attr_getguardsize +return a value of 0. +Otherwise, an error number is returned to indicate the error. +.Pp +The +.Fn pthread_attr_getguardsize +function stores the +.Va guardsize +attribute value in +.Fa guardsize +if successful. +.Sh ERRORS +No errors are defined. +.Pp +These functions will not return an error code of +.Bq Er EINTR . +.Sh SEE ALSO +.Xr pthread_attr_init 3 , +.Xr pthread_attr_setdetachstate 3 , +.Xr pthread_attr_setstack 3 , +.Xr pthread_attr_setstackaddr 3 , +.Xr pthread_attr_setstacksize 3 , +.Xr pthread_create 3 , +.Xr pthreads 3 +.Sh STANDARDS +.Fn pthread_attr_setguardsize +and +.Fn pthread_attr_getguardsize +conform to ISO/IEC 9945-1 ANSI/IEEE +.Pq Dq Tn POSIX +Std 1003.1, 2004 Edition. diff --git a/lib/libpthread/man/pthread_attr_setstack.3 b/lib/libpthread/man/pthread_attr_setstack.3 index c2cd372c8e7..ed4250eedbe 100644 --- a/lib/libpthread/man/pthread_attr_setstack.3 +++ b/lib/libpthread/man/pthread_attr_setstack.3 @@ -1,9 +1,9 @@ -.\" $OpenBSD: pthread_attr_setstack.3,v 1.2 2008/07/05 10:43:07 jmc Exp $ +.\" $OpenBSD: pthread_attr_setstack.3,v 1.3 2008/12/18 09:30:32 guenther Exp $ .\" Manual page derived from TOG's UNIX98 documentation. .\" .\" David Leonard, 2000. Public Domain. .\" -.Dd $Mdocdate: July 5 2008 $ +.Dd $Mdocdate: December 18 2008 $ .Dt PTHREAD_ATTR_SETSTACK 3 .Os .Sh NAME @@ -79,6 +79,7 @@ These functions will not return an error code of .Sh SEE ALSO .Xr pthread_attr_init 3 , .Xr pthread_attr_setdetachstate 3 , +.Xr pthread_attr_setguardsize 3 , .Xr pthread_attr_setstackaddr 3 , .Xr pthread_attr_setstacksize 3 , .Xr pthread_create 3 , diff --git a/lib/libpthread/man/pthread_attr_setstackaddr.3 b/lib/libpthread/man/pthread_attr_setstackaddr.3 index efb3eea54b4..0de282cd15b 100644 --- a/lib/libpthread/man/pthread_attr_setstackaddr.3 +++ b/lib/libpthread/man/pthread_attr_setstackaddr.3 @@ -1,9 +1,9 @@ -.\" $OpenBSD: pthread_attr_setstackaddr.3,v 1.9 2008/07/05 08:03:57 guenther Exp $ +.\" $OpenBSD: pthread_attr_setstackaddr.3,v 1.10 2008/12/18 09:30:32 guenther Exp $ .\" Manual page derived from TOG's UNIX98 documentation. .\" .\" David Leonard, 2000. Public Domain. .\" -.Dd $Mdocdate: July 5 2008 $ +.Dd $Mdocdate: December 18 2008 $ .Dt PTHREAD_ATTR_SETSTACKADDR 3 .Os .Sh NAME @@ -57,6 +57,7 @@ These functions will not return an error code of .Sh SEE ALSO .Xr pthread_attr_init 3 , .Xr pthread_attr_setdetachstate 3 , +.Xr pthread_attr_setguardsize 3 , .Xr pthread_attr_setstack 3 , .Xr pthread_attr_setstacksize 3 , .Xr pthread_create 3 , diff --git a/lib/libpthread/man/pthread_attr_setstacksize.3 b/lib/libpthread/man/pthread_attr_setstacksize.3 index b26f31be486..2189e0b1eb1 100644 --- a/lib/libpthread/man/pthread_attr_setstacksize.3 +++ b/lib/libpthread/man/pthread_attr_setstacksize.3 @@ -1,9 +1,9 @@ -.\" $OpenBSD: pthread_attr_setstacksize.3,v 1.8 2008/07/05 08:03:57 guenther Exp $ +.\" $OpenBSD: pthread_attr_setstacksize.3,v 1.9 2008/12/18 09:30:32 guenther Exp $ .\" Manual page derived from TOG's UNIX98 documentation. .\" .\" David Leonard, 2000. Public Domain. .\" -.Dd $Mdocdate: July 5 2008 $ +.Dd $Mdocdate: December 18 2008 $ .Dt PTHREAD_ATTR_SETSTACKSIZE 3 .Os .Sh NAME @@ -65,6 +65,7 @@ These functions will not return an error code of .Sh SEE ALSO .Xr pthread_attr_init 3 , .Xr pthread_attr_setdetachstate 3 , +.Xr pthread_attr_setguardsize 3 , .Xr pthread_attr_setstack 3 , .Xr pthread_attr_setstackaddr 3 , .Xr pthread_create 3 , diff --git a/lib/libpthread/man/pthread_create.3 b/lib/libpthread/man/pthread_create.3 index 87833f5c736..8e9be64e3c6 100644 --- a/lib/libpthread/man/pthread_create.3 +++ b/lib/libpthread/man/pthread_create.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: pthread_create.3,v 1.12 2008/07/05 10:43:07 jmc Exp $ +.\" $OpenBSD: pthread_create.3,v 1.13 2008/12/18 09:30:32 guenther Exp $ .\" .\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>. .\" All rights reserved. @@ -32,7 +32,7 @@ .\" .\" $FreeBSD: pthread_create.3,v 1.8 1999/08/28 00:03:04 peter Exp $ .\" -.Dd $Mdocdate: July 5 2008 $ +.Dd $Mdocdate: December 18 2008 $ .Dt PTHREAD_CREATE 3 .Os .Sh NAME @@ -111,6 +111,7 @@ is invalid. .Xr fork 2 , .Xr pthread_attr_init 3 , .Xr pthread_attr_setdetachstate 3 , +.Xr pthread_attr_setguardsize 3 , .Xr pthread_attr_setstack 3 , .Xr pthread_attr_setstackaddr 3 , .Xr pthread_attr_setstacksize 3 , diff --git a/lib/libpthread/man/pthreads.3 b/lib/libpthread/man/pthreads.3 index d760eaaa835..462959cb381 100644 --- a/lib/libpthread/man/pthreads.3 +++ b/lib/libpthread/man/pthreads.3 @@ -1,6 +1,6 @@ -.\" $OpenBSD: pthreads.3,v 1.28 2008/07/05 08:03:57 guenther Exp $ +.\" $OpenBSD: pthreads.3,v 1.29 2008/12/18 09:30:32 guenther Exp $ .\" David Leonard <d@openbsd.org>, 1998. Public domain. -.Dd $Mdocdate: July 5 2008 $ +.Dd $Mdocdate: December 18 2008 $ .Dt PTHREADS 3 .Os .Sh NAME @@ -84,6 +84,10 @@ Set stackaddr attribute. Get stacksize attribute. .It Fn pthread_attr_setstacksize Set stacksize attribute. +.It Fn pthread_attr_getguardsize +Get guardsize attribute. +.It Fn pthread_attr_setguardsize +Set guardsize attribute. .El .Ss Cleanup Routines The functions available are as follows: @@ -491,6 +495,7 @@ environment variable. .Xr pthread_atfork 3 , .Xr pthread_attr_init 3 , .Xr pthread_attr_setdetachstate 3 , +.Xr pthread_attr_setguardsize 3 , .Xr pthread_attr_setstack 3 , .Xr pthread_attr_setstackaddr 3 , .Xr pthread_attr_setstacksize 3 , |