]> git.saurik.com Git - apple/libc.git/blame - pthreads/pthread_attr_init_destroy.3
Libc-763.13.tar.gz
[apple/libc.git] / pthreads / pthread_attr_init_destroy.3
CommitLineData
34e8f829
A
1.\" Copyright (c) 2004-2007 Apple Inc. All rights reserved.
2.Dd December 31, 2007
3.Dt PTHREAD_ATTR 3
4.Os
5.Sh NAME
6.Nm pthread_attr_destroy ,
7.Nm pthread_attr_init
8.Nd thread attribute operations
9.Sh SYNOPSIS
10.Fd #include <pthread.h>
11.Ft int
12.Fo pthread_attr_destroy
13.Fa "pthread_attr_t *attr"
14.Fc
15.Ft int
16.Fo pthread_attr_init
17.Fa "pthread_attr_t *attr"
18.Fc
19.Sh DESCRIPTION
20Thread attributes are used to specify parameters to
21.Fn pthread_create .
22One attribute object can be used in multiple calls to
23.Fn pthread_create ,
24with or without modifications between calls.
25.Pp
26The
27.Fn pthread_attr_init
28function initializes
29.Fa attr
30with all the default thread attributes.
31.Pp
32The
33.Fn pthread_attr_destroy
34function destroys
35.Fa attr .
36.Sh RETURN VALUES
37If successful, these functions return 0.
38Otherwise, an error number is returned to indicate the error.
39.Sh ERRORS
40.Fn pthread_attr_init
41will fail if:
42.Bl -tag -width Er
43.\" ========
44.It Bq Er ENOMEM
45Out of memory.
46.El
47.Pp
48.Fn pthread_attr_destroy
49will fail if:
50.Bl -tag -width Er
51.\" ========
52.It Bq Er EINVAL
53Invalid value for
54.Fa attr .
55.El
56.Pp
57.Sh SEE ALSO
58.Xr pthread_create 3
59.Sh STANDARDS
60.Fn pthread_attr_init ,
61.Fn pthread_attr_destroy
62conform to
63.St -p1003.1-96
64.Pp