1PTHREAD_BARRIERATTR_DESTROY(P3OPS)IX Programmer's MaPnTuHaRlEAD_BARRIERATTR_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
12 pthread_barrierattr_destroy, pthread_barrierattr_init — destroy and
13 initialize the barrier attributes object
14
16 #include <pthread.h>
17
18 int pthread_barrierattr_destroy(pthread_barrierattr_t *attr);
19 int pthread_barrierattr_init(pthread_barrierattr_t *attr);
20
22 The pthread_barrierattr_destroy() function shall destroy a barrier
23 attributes object. A destroyed attr attributes object can be reinitial‐
24 ized using pthread_barrierattr_init(); the results of otherwise refer‐
25 encing the object after it has been destroyed are undefined. An imple‐
26 mentation may cause pthread_barrierattr_destroy() to set the object
27 referenced by attr to an invalid value.
28
29 The pthread_barrierattr_init() function shall initialize a barrier
30 attributes object attr with the default value for all of the attributes
31 defined by the implementation.
32
33 If pthread_barrierattr_init() is called specifying an already initial‐
34 ized attr attributes object, the results are undefined.
35
36 After a barrier attributes object has been used to initialize one or
37 more barriers, any function affecting the attributes object (including
38 destruction) shall not affect any previously initialized barrier.
39
40 The behavior is undefined if the value specified by the attr argument
41 to pthread_barrierattr_destroy() does not refer to an initialized bar‐
42 rier attributes object.
43
45 If successful, the pthread_barrierattr_destroy() and pthread_barrier‐
46 attr_init() functions shall return zero; otherwise, an error number
47 shall be returned to indicate the error.
48
50 The pthread_barrierattr_init() function shall fail if:
51
52 ENOMEM Insufficient memory exists to initialize the barrier attributes
53 object.
54
55 These functions shall not return an error code of [EINTR].
56
57 The following sections are informative.
58
60 None.
61
63 None.
64
66 If an implementation detects that the value specified by the attr argu‐
67 ment to pthread_barrierattr_destroy() does not refer to an initialized
68 barrier attributes object, it is recommended that the function should
69 fail and report an [EINVAL] error.
70
72 None.
73
75 pthread_barrierattr_getpshared()
76
77 The Base Definitions volume of POSIX.1‐2017, <pthread.h>
78
80 Portions of this text are reprinted and reproduced in electronic form
81 from IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
82 table Operating System Interface (POSIX), The Open Group Base Specifi‐
83 cations Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of
84 Electrical and Electronics Engineers, Inc and The Open Group. In the
85 event of any discrepancy between this version and the original IEEE and
86 The Open Group Standard, the original IEEE and The Open Group Standard
87 is the referee document. The original Standard can be obtained online
88 at http://www.opengroup.org/unix/online.html .
89
90 Any typographical or formatting errors that appear in this page are
91 most likely to have been introduced during the conversion of the source
92 files to man page format. To report such errors, see https://www.ker‐
93 nel.org/doc/man-pages/reporting_bugs.html .
94
95
96
97IEEE/The Open Group 2017 PTHREAD_BARRIERATTR_DESTROY(3P)