1PTHREAD_CONDATTR_DESTROY(3P)POSIX Programmer's ManuaPlTHREAD_CONDATTR_DESTROY(3P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
11
13 pthread_condattr_destroy, pthread_condattr_init — destroy and initial‐
14 ize the condition variable attributes object
15
17 #include <pthread.h>
18
19 int pthread_condattr_destroy(pthread_condattr_t *attr);
20 int pthread_condattr_init(pthread_condattr_t *attr);
21
23 The pthread_condattr_destroy() function shall destroy a condition vari‐
24 able attributes object; the object becomes, in effect, uninitialized.
25 An implementation may cause pthread_condattr_destroy() to set the
26 object referenced by attr to an invalid value. A destroyed attr
27 attributes object can be reinitialized using pthread_condattr_init();
28 the results of otherwise referencing the object after it has been
29 destroyed are undefined.
30
31 The pthread_condattr_init() function shall initialize a condition vari‐
32 able attributes object attr with the default value for all of the
33 attributes defined by the implementation.
34
35 Results are undefined if pthread_condattr_init() is called specifying
36 an already initialized attr attributes object.
37
38 After a condition variable attributes object has been used to initial‐
39 ize one or more condition variables, any function affecting the
40 attributes object (including destruction) shall not affect any previ‐
41 ously initialized condition variables.
42
43 This volume of POSIX.1‐2008 requires two attributes, the clock
44 attribute and the process-shared attribute.
45
46 Additional attributes, their default values, and the names of the asso‐
47 ciated functions to get and set those attribute values are implementa‐
48 tion-defined.
49
50 The behavior is undefined if the value specified by the attr argument
51 to pthread_condattr_destroy() does not refer to an initialized condi‐
52 tion variable attributes object.
53
55 If successful, the pthread_condattr_destroy() and pthread_con‐
56 dattr_init() functions shall return zero; otherwise, an error number
57 shall be returned to indicate the error.
58
60 The pthread_condattr_init() function shall fail if:
61
62 ENOMEM Insufficient memory exists to initialize the condition variable
63 attributes object.
64
65 These functions shall not return an error code of [EINTR].
66
67 The following sections are informative.
68
70 None.
71
73 None.
74
76 A process-shared attribute has been defined for condition variables for
77 the same reason it has been defined for mutexes.
78
79 If an implementation detects that the value specified by the attr argu‐
80 ment to pthread_condattr_destroy() does not refer to an initialized
81 condition variable attributes object, it is recommended that the func‐
82 tion should fail and report an [EINVAL] error.
83
84 See also pthread_attr_destroy() and pthread_mutex_destroy().
85
87 None.
88
90 pthread_attr_destroy(), pthread_cond_destroy(), pthread_condattr_getp‐
91 shared(), pthread_create(), pthread_mutex_destroy()
92
93 The Base Definitions volume of POSIX.1‐2008, <pthread.h>
94
96 Portions of this text are reprinted and reproduced in electronic form
97 from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
98 -- Portable Operating System Interface (POSIX), The Open Group Base
99 Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
100 cal and Electronics Engineers, Inc and The Open Group. (This is
101 POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
102 event of any discrepancy between this version and the original IEEE and
103 The Open Group Standard, the original IEEE and The Open Group Standard
104 is the referee document. The original Standard can be obtained online
105 at http://www.unix.org/online.html .
106
107 Any typographical or formatting errors that appear in this page are
108 most likely to have been introduced during the conversion of the source
109 files to man page format. To report such errors, see https://www.ker‐
110 nel.org/doc/man-pages/reporting_bugs.html .
111
112
113
114IEEE/The Open Group 2013 PTHREAD_CONDATTR_DESTROY(3P)