summaryrefslogtreecommitdiff
path: root/lib/libc_r
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>2000-01-06 06:15:31 +0000
committerDavid Leonard <d@cvs.openbsd.org>2000-01-06 06:15:31 +0000
commit68adaa6592a47e25bfe52c685c64bf942f14191f (patch)
treeedac0b656d62031eb1a4d3800403436058089f8a /lib/libc_r
parent5b11221fa62bf2203da171da8608b61dee71880d (diff)
document
Diffstat (limited to 'lib/libc_r')
-rw-r--r--lib/libc_r/man/pthread_attr_init.371
-rw-r--r--lib/libc_r/man/pthread_attr_setdetachstate.397
-rw-r--r--lib/libc_r/man/pthread_attr_setstackaddr.364
-rw-r--r--lib/libc_r/man/pthread_attr_setstacksize.372
4 files changed, 304 insertions, 0 deletions
diff --git a/lib/libc_r/man/pthread_attr_init.3 b/lib/libc_r/man/pthread_attr_init.3
new file mode 100644
index 00000000000..12be2137e69
--- /dev/null
+++ b/lib/libc_r/man/pthread_attr_init.3
@@ -0,0 +1,71 @@
+.\" $OpenBSD: pthread_attr_init.3,v 1.1 2000/01/06 06:15:29 d Exp $
+.\" Manual page derived from TOG's UNIX98 documentation.
+.Dd January 6, 2000
+.Dt PTHREAD_ATTR_INIT 3
+.Os
+.Sh NAME
+.Nm pthread_attr_init ,
+.Nm pthread_attr_destroy
+.Nd initialise and destroy threads attribute object
+.Sh SYNOPSIS
+.Fd #include <pthread.h>
+.Ft int
+.Fn pthread_attr_init "pthread_attr_t *attr"
+.Ft int
+.Fn pthread_attr_destroy "pthread_attr_t *attr"
+.Sh DESCRIPTION
+The function
+.Fn pthread_attr_init
+initialises a thread attributes
+object
+.Fa attr
+with the default value for all of the individual
+attributes used by a given implementation.
+.Pp
+The resulting attribute object (possibly modified by setting
+individual attribute values), when used by
+.Xr pthread_create 3 ,
+defines the attributes of the thread created. A single attributes
+object can be used in multiple simultaneous calls to
+.Xr pthread_create 3 .
+.Pp
+The
+.Fn pthread_attr_destroy
+function is used to destroy a thread
+attributes object. An implementation may cause
+.Fn pthread_attr_destroy
+to set
+.Fa attr
+to an implementation-dependent
+invalid value. The behaviour of using the attribute after it has
+been destroyed is undefined.
+.Sh RETURN VALUE
+Upon successful completion,
+.Fn pthread_attr_init
+and
+.Fn pthread_attr_destroy
+return a value of 0. Otherwise, an error
+number is returned to indicate the error.
+.Sh ERRORS
+The
+.Fn pthread_attr_init
+function will fail if:
+.Bl -tag -width Er
+.It Bq Er ENOMEM
+Insufficient memory exists to initialise the thread attributes
+object.
+.El
+.Pp
+These functions will not return an error code of
+.Bq Er EINTR .
+.Sh SEE ALSO
+.Xr pthread_attr_setstackaddr 3 ,
+.Xr pthread_attr_setstacksize 3 ,
+.Xr pthread_attr_setdetachstate 3 ,
+.Xr pthread_create 3 ,
+.Xr pthreads 3
+.Sh STANDARDS
+.Fn pthread_create
+conforms to ISO/IEC 9945-1 ANSI/IEEE
+.Pq Dq Tn POSIX
+Std 1003.1 Second Edition 1996-07-12.
diff --git a/lib/libc_r/man/pthread_attr_setdetachstate.3 b/lib/libc_r/man/pthread_attr_setdetachstate.3
new file mode 100644
index 00000000000..0f9513f9e88
--- /dev/null
+++ b/lib/libc_r/man/pthread_attr_setdetachstate.3
@@ -0,0 +1,97 @@
+.\" $OpenBSD: pthread_attr_setdetachstate.3,v 1.1 2000/01/06 06:15:29 d Exp $
+.\" Manual page derived from TOG's UNIX98 documentation.
+.Dd January 6, 2000
+.Dt PTHREAD_ATTR_SETDETACHSTATE 3
+.Os
+.Sh NAME
+.Nm pthread_attr_setdetachstate ,
+.Nm pthread_attr_getdetachstate
+.Nd set and get detachstate attribute
+.Sh SYNOPSIS
+.Fd #include <pthread.h>
+.Ft int
+.Fn pthread_attr_setdetachstate "pthread_attr_t *attr" "int detachstate"
+.Ft int
+.Fn pthread_attr_getdetachstate "pthread_attr_t *attr" "int *detachstate"
+.Sh DESCRIPTION
+The
+.Va detachstate
+attribute controls whether the thread is created in
+a detached state. If the thread is created detached, then use of
+the ID of the newly created thread by the
+.Xr pthread_detach 3
+or
+.Xr pthread_join 3
+function is an error.
+.Pp
+The
+.Fn pthread_attr_setdetachstate
+and
+.Fn pthread_attr_getdetachstate
+functions, respectively, set and get the
+.Va detachstate
+attribute in the
+.Fa attr
+object.
+.Pp
+The
+.Fa detachstate
+can be set to either
+.Dv PTHREAD_CREATE_DETACHED
+or
+.Dv PTHREAD_CREATE_JOINABLE .
+A value of
+.Dv PTHREAD_CREATE_DETACHED
+causes
+all threads created with
+.Fa attr
+to be in the detached state, whereas
+using a value of
+.Dv PTHREAD_CREATE_JOINABLE
+causes all threads created
+with
+.Fa attr
+to be in the joinable state. The default value of the
+.Va detachstate
+attribute is
+.Dv PTHREAD_CREATE_JOINABLE .
+.Pp
+.Sh RETURN VALUE
+Upon successful completion,
+.Fn pthread_attr_setdetachstate
+and
+.Fn pthread_attr_getdetachstate
+return a value of 0. Otherwise, an
+error number is returned to indicate the error.
+.Pp
+The
+.Fn pthread_attr_getdetachstate
+function stores the value of the
+.Va detachstate
+attribute in
+.Fa detachstate
+if successful.
+.Sh ERRORS
+The
+.Fn pthread_attr_setdetachstate
+function will fail if:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+The value of
+.Fa detachstate
+was not valid.
+.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_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
+.Pq Dq Tn POSIX
+Std 1003.1 Second Edition 1996-07-12.
diff --git a/lib/libc_r/man/pthread_attr_setstackaddr.3 b/lib/libc_r/man/pthread_attr_setstackaddr.3
new file mode 100644
index 00000000000..1ca3f85ddd2
--- /dev/null
+++ b/lib/libc_r/man/pthread_attr_setstackaddr.3
@@ -0,0 +1,64 @@
+.\" $OpenBSD: pthread_attr_setstackaddr.3,v 1.1 2000/01/06 06:15:29 d Exp $
+.\" Manual page derived from TOG's UNIX98 documentation.
+.Dd January 6, 2000
+.Dt PTHREAD_ATTR_SETSTACKADDR 3
+.Os
+.Sh NAME
+.Nm pthread_attr_setstackaddr ,
+.Nm pthread_attr_getstackaddr
+.Nd set and get stackaddr attribute
+.Sh SYNOPSIS
+.Fd #include <pthread.h>
+.Ft int
+.Fn pthread_attr_setstackaddr "pthread_attr_t *attr" "void *stackaddr"
+.Ft int
+.Fn pthread_attr_getstackaddr "pthread_attr_t *attr" "void **stackaddr"
+.Sh DESCRIPTION
+The functions
+.Fn pthread_attr_setstackaddr
+and
+.Fn pthread_attr_getstackaddr ,
+respectively, set and get the thread
+creation
+.Va stackaddr
+attribute in the
+.Fa attr
+object.
+.Pp
+The
+.Va stackaddr
+attribute specifies the location of storage to be
+used for the created thread's stack. The size of the storage is at
+least
+.Dv PTHREAD_STACK_MIN.
+.Sh RETURN VALUE
+Upon successful completion,
+.Fn pthread_attr_setstackaddr
+and
+.Fn pthread_attr_getstackaddr
+return a value of 0. Otherwise, an error
+number is returned to indicate the error.
+.Pp
+The
+.Fn pthread_attr_getstackaddr
+function stores the
+.Va stackaddr
+attribute value in
+.Fa stackaddr
+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_setstacksize 3 ,
+.Xr pthread_create 3 ,
+.Xr pthreads 3
+.Sh STANDARDS
+.Fn pthread_create
+conforms to ISO/IEC 9945-1 ANSI/IEEE
+.Pq Dq Tn POSIX
+Std 1003.1 Second Edition 1996-07-12.
diff --git a/lib/libc_r/man/pthread_attr_setstacksize.3 b/lib/libc_r/man/pthread_attr_setstacksize.3
new file mode 100644
index 00000000000..bc3eff8d438
--- /dev/null
+++ b/lib/libc_r/man/pthread_attr_setstacksize.3
@@ -0,0 +1,72 @@
+.\" $OpenBSD: pthread_attr_setstacksize.3,v 1.1 2000/01/06 06:15:30 d Exp $
+.\" Manual page derived from TOG's UNIX98 documentation.
+.Dd January 6, 2000
+.Dt PTHREAD_ATTR_SETSTACKSIZE 3
+.Os
+.Sh NAME
+.Nm pthread_attr_setstacksize ,
+.Nm pthread_attr_getstacksize
+.Nd set and get stacksize attribute
+.Sh SYNOPSIS
+.Fd #include <pthread.h>
+.Ft int
+.Fn pthread_attr_setstacksize "pthread_attr_t *attr" "size_t stacksize"
+.Ft int
+.Fn pthread_attr_getstacksize "pthread_attr_t *attr" "size_t *stacksize"
+.Sh DESCRIPTION
+The functions
+.Fn pthread_attr_setstacksize
+and
+.Fn pthread_attr_getstacksize ,
+respectively, set and get the thread
+creation
+.Va stacksize
+attribute in the
+.Fa attr
+object.
+.Pp
+The
+.Va stacksize
+attribute defines the minimum stack size (in bytes)
+allocated for the created threads stack.
+.Sh RETURN VALUE
+Upon successful completion,
+.Fn pthread_attr_setstacksize
+and
+.Fn pthread_attr_getstacksize
+return a value of 0. Otherwise, an error
+number is returned to indicate the error.
+.Pp
+The
+.Fn pthread_attr_getstacksize
+function stores the
+.Va stacksize
+attribute value in
+.Fa stacksize
+if successful.
+.Sh ERRORS
+The
+.Fn pthread_attr_setstacksize
+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.
+.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_create 3 ,
+.Xr pthreads 3
+.Sh STANDARDS
+.Fn pthread_create
+conforms to ISO/IEC 9945-1 ANSI/IEEE
+.Pq Dq Tn POSIX
+Std 1003.1 Second Edition 1996-07-12.