diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2008-07-05 08:03:58 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2008-07-05 08:03:58 +0000 |
commit | f8937769e191d23294882d54793ad4fda2f182f8 (patch) | |
tree | c07b7df236f2b2bdfb37bbafa25bae0916467beb /lib/libpthread | |
parent | 0e4975ba5f04c16243aa78c340470bc1960dec50 (diff) |
Add manpage for pthread_attr_[sg]etstack(3)
Correct misnaming in STANDARDS section
ok brad@ otto@
Diffstat (limited to 'lib/libpthread')
-rw-r--r-- | lib/libpthread/man/Makefile.inc | 4 | ||||
-rw-r--r-- | lib/libpthread/man/pthread_attr_init.3 | 11 | ||||
-rw-r--r-- | lib/libpthread/man/pthread_attr_setdetachstate.3 | 11 | ||||
-rw-r--r-- | lib/libpthread/man/pthread_attr_setstack.3 | 92 | ||||
-rw-r--r-- | lib/libpthread/man/pthread_attr_setstackaddr.3 | 11 | ||||
-rw-r--r-- | lib/libpthread/man/pthread_attr_setstacksize.3 | 11 | ||||
-rw-r--r-- | lib/libpthread/man/pthread_create.3 | 5 | ||||
-rw-r--r-- | lib/libpthread/man/pthreads.3 | 9 |
8 files changed, 133 insertions, 21 deletions
diff --git a/lib/libpthread/man/Makefile.inc b/lib/libpthread/man/Makefile.inc index 680ee64ca41..bfa2dbda449 100644 --- a/lib/libpthread/man/Makefile.inc +++ b/lib/libpthread/man/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.21 2005/10/30 03:37:34 brad Exp $ +# $OpenBSD: Makefile.inc,v 1.22 2008/07/05 08:03:57 guenther Exp $ # $FreeBSD: Makefile.inc,v 1.6 1999/08/28 00:03:02 peter Exp $ # POSIX thread man files @@ -8,6 +8,7 @@ MAN+= \ pthread_atfork.3 \ pthread_attr_init.3 \ + pthread_attr_setstack.3 \ pthread_attr_setstackaddr.3 \ pthread_attr_setstacksize.3 \ pthread_attr_setdetachstate.3 \ @@ -81,6 +82,7 @@ MLINKS+=flockfile.3 funlockfile.3 \ pthread_suspend_np.3 pthread_resume_np.3 \ pthread_single_np.3 pthread_multi_np.3 \ pthread_attr_init.3 pthread_attr_destroy.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_setdetachstate.3 pthread_attr_getdetachstate.3 \ diff --git a/lib/libpthread/man/pthread_attr_init.3 b/lib/libpthread/man/pthread_attr_init.3 index 951ddb8d8fd..ea8d64e0c70 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.7 2007/05/31 19:19:36 jmc Exp $ +.\" $OpenBSD: pthread_attr_init.3,v 1.8 2008/07/05 08:03:57 guenther Exp $ .\" Manual page derived from TOG's UNIX98 documentation. .\" .\" David Leonard, 2000. Public Domain. .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: July 5 2008 $ .Dt PTHREAD_ATTR_INIT 3 .Os .Sh NAME @@ -64,12 +64,15 @@ These functions will not return an error code of .Bq Er EINTR . .Sh SEE ALSO .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_create -conforms to ISO/IEC 9945-1 ANSI/IEEE +.Fn pthread_attr_destroy +and +.Fn pthread_attr_init +conform to ISO/IEC 9945-1 ANSI/IEEE .Pq Dq Tn POSIX Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_attr_setdetachstate.3 b/lib/libpthread/man/pthread_attr_setdetachstate.3 index 694e58061bd..6fe3a88229d 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.7 2007/05/31 19:19:36 jmc Exp $ +.\" $OpenBSD: pthread_attr_setdetachstate.3,v 1.8 2008/07/05 08:03:57 guenther Exp $ .\" Manual page derived from TOG's UNIX98 documentation. .\" .\" David Leonard, 2000. Public Domain. .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: July 5 2008 $ .Dt PTHREAD_ATTR_SETDETACHSTATE 3 .Os .Sh NAME @@ -90,12 +90,15 @@ These functions will not return an error code of .Bq Er EINTR . .Sh SEE ALSO .Xr pthread_attr_init 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_create -conforms to ISO/IEC 9945-1 ANSI/IEEE +.Fn pthread_attr_setdetachstate +and +.Fn pthread_attr_getdetachstate +conform to ISO/IEC 9945-1 ANSI/IEEE .Pq Dq Tn POSIX Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_attr_setstack.3 b/lib/libpthread/man/pthread_attr_setstack.3 new file mode 100644 index 00000000000..f9bf37838f5 --- /dev/null +++ b/lib/libpthread/man/pthread_attr_setstack.3 @@ -0,0 +1,92 @@ +.\" $OpenBSD: pthread_attr_setstack.3,v 1.1 2008/07/05 08:03:57 guenther Exp $ +.\" Manual page derived from TOG's UNIX98 documentation. +.\" +.\" David Leonard, 2000. Public Domain. +.\" +.Dd $Mdocdate: July 5 2008 $ +.Dt PTHREAD_ATTR_SETSTACKADDR 3 +.Os +.Sh NAME +.Nm pthread_attr_setstack , +.Nm pthread_attr_getstack +.Nd set and get stack attributes +.Sh SYNOPSIS +.Fd #include <pthread.h> +.Ft int +.Fn pthread_attr_setstack "pthread_attr_t *attr" "void *stackaddr" "size_t stacksize" +.Ft int +.Fn pthread_attr_getstack "const pthread_attr_t *attr" "void **stackaddr" "size_t *stacksize" +.Sh DESCRIPTION +The functions +.Fn pthread_attr_setstack +and +.Fn pthread_attr_getstack , +respectively, set and get the thread +creation +.Va stackaddr +and +.Va stacksize +attributes in the +.Fa attr +object. +.Pp +The stack attributes specify the area of storage to be used for the +created thread's stack. +The base (lowest addressable byte) of the storage shall be +.Va stackaddr , +and the size of the storage shall be +.Va stacksize +bytes. +The stacksize shall be at least +.Dv PTHREAD_STACK_MIN . +.Sh RETURN VALUES +Upon successful completion, +.Fn pthread_attr_setstack +and +.Fn pthread_attr_getstack +return a value of 0. +Otherwise, an error number is returned to indicate the error. +.Pp +The +.Fn pthread_attr_getstack +function stores the +.Va stackaddr +attribute value in +.Fa stackaddr +and the +.Va stacksize +attribute value in +.Fa stacksize +if successful. +.Sh ERRORS +The +.Fn pthread_attr_setstack +function will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The value of +.Fa stacksize +is less than +.Dv PTHREAD_STACK_MIN +or exceeds a system-imposed limit or the value of +.Fa stackaddr +is +.Dv NULL . +.El +.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_setstackaddr 3 , +.Xr pthread_attr_setstacksize 3 , +.Xr pthread_create 3 , +.Xr pthreads 3 +.Sh STANDARDS +.Fn pthread_attr_setstack +and +.Fn pthread_attr_getstack +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_setstackaddr.3 b/lib/libpthread/man/pthread_attr_setstackaddr.3 index 989b337af6f..efb3eea54b4 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.8 2007/05/31 19:19:36 jmc Exp $ +.\" $OpenBSD: pthread_attr_setstackaddr.3,v 1.9 2008/07/05 08:03:57 guenther Exp $ .\" Manual page derived from TOG's UNIX98 documentation. .\" .\" David Leonard, 2000. Public Domain. .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: July 5 2008 $ .Dt PTHREAD_ATTR_SETSTACKADDR 3 .Os .Sh NAME @@ -57,11 +57,14 @@ 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_setstack 3 , .Xr pthread_attr_setstacksize 3 , .Xr pthread_create 3 , .Xr pthreads 3 .Sh STANDARDS -.Fn pthread_create -conforms to ISO/IEC 9945-1 ANSI/IEEE +.Fn pthread_attr_setstackaddr +and +.Fn pthread_attr_getstackaddr +conform to ISO/IEC 9945-1 ANSI/IEEE .Pq Dq Tn POSIX Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_attr_setstacksize.3 b/lib/libpthread/man/pthread_attr_setstacksize.3 index e6d68bfa54f..b26f31be486 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.7 2007/05/31 19:19:36 jmc Exp $ +.\" $OpenBSD: pthread_attr_setstacksize.3,v 1.8 2008/07/05 08:03:57 guenther Exp $ .\" Manual page derived from TOG's UNIX98 documentation. .\" .\" David Leonard, 2000. Public Domain. .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: July 5 2008 $ .Dt PTHREAD_ATTR_SETSTACKSIZE 3 .Os .Sh NAME @@ -65,11 +65,14 @@ 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_setstack 3 , .Xr pthread_attr_setstackaddr 3 , .Xr pthread_create 3 , .Xr pthreads 3 .Sh STANDARDS -.Fn pthread_create -conforms to ISO/IEC 9945-1 ANSI/IEEE +.Fn pthread_attr_setstacksize +and +.Fn pthread_attr_getstacksize +conform to ISO/IEC 9945-1 ANSI/IEEE .Pq Dq Tn POSIX Std 1003.1 Second Edition 1996-07-12. diff --git a/lib/libpthread/man/pthread_create.3 b/lib/libpthread/man/pthread_create.3 index 3625dcc06b6..d3f5e0a82de 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.10 2007/05/31 19:19:36 jmc Exp $ +.\" $OpenBSD: pthread_create.3,v 1.11 2008/07/05 08:03:57 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: May 31 2007 $ +.Dd $Mdocdate: July 5 2008 $ .Dt PTHREAD_CREATE 3 .Os .Sh NAME @@ -110,6 +110,7 @@ is invalid. .Xr fork 2 , .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_cleanup_pop 3 , diff --git a/lib/libpthread/man/pthreads.3 b/lib/libpthread/man/pthreads.3 index 690693727ac..d760eaaa835 100644 --- a/lib/libpthread/man/pthreads.3 +++ b/lib/libpthread/man/pthreads.3 @@ -1,6 +1,6 @@ -.\" $OpenBSD: pthreads.3,v 1.27 2007/05/31 19:19:37 jmc Exp $ +.\" $OpenBSD: pthreads.3,v 1.28 2008/07/05 08:03:57 guenther Exp $ .\" David Leonard <d@openbsd.org>, 1998. Public domain. -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: July 5 2008 $ .Dt PTHREADS 3 .Os .Sh NAME @@ -72,6 +72,10 @@ Destroy a threads attribute object. Get detachstate attribute. .It Fn pthread_attr_setdetachstate Set detachstate attribute. +.It Fn pthread_attr_getstack +Get stackaddr and stacksize attributes. +.It Fn pthread_attr_setstack +Set stackaddr and stacksize attributes. .It Fn pthread_attr_getstackaddr Get stackaddr attribute. .It Fn pthread_attr_setstackaddr @@ -487,6 +491,7 @@ environment variable. .Xr pthread_atfork 3 , .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_cancel 3 , |