]> git.saurik.com Git - apple/libpthread.git/blob - man/pthread_attr_init_destroy.3
libpthread-218.30.1.tar.gz
[apple/libpthread.git] / man / pthread_attr_init_destroy.3
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
20 Thread attributes are used to specify parameters to
21 .Fn pthread_create .
22 One attribute object can be used in multiple calls to
23 .Fn pthread_create ,
24 with or without modifications between calls.
25 .Pp
26 The
27 .Fn pthread_attr_init
28 function initializes
29 .Fa attr
30 with all the default thread attributes.
31 .Pp
32 The
33 .Fn pthread_attr_destroy
34 function destroys
35 .Fa attr .
36 .Sh RETURN VALUES
37 If successful, these functions return 0.
38 Otherwise, an error number is returned to indicate the error.
39 .Sh ERRORS
40 .Fn pthread_attr_init
41 will fail if:
42 .Bl -tag -width Er
43 .\" ========
44 .It Bq Er ENOMEM
45 Out of memory.
46 .El
47 .Pp
48 .Fn pthread_attr_destroy
49 will fail if:
50 .Bl -tag -width Er
51 .\" ========
52 .It Bq Er EINVAL
53 Invalid 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
62 conform to
63 .St -p1003.1-96
64 .Pp