1PTHREAD_CONDATTR_DESTROY(3P)POSIX Programmer's ManuaPlTHREAD_CONDATTR_DESTROY(3P)
2
3
4

PROLOG

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

NAME

12       pthread_condattr_destroy, pthread_condattr_init — destroy and  initial‐
13       ize the condition variable attributes object
14

SYNOPSIS

16       #include <pthread.h>
17
18       int pthread_condattr_destroy(pthread_condattr_t *attr);
19       int pthread_condattr_init(pthread_condattr_t *attr);
20

DESCRIPTION

22       The pthread_condattr_destroy() function shall destroy a condition vari‐
23       able attributes object; the object becomes, in  effect,  uninitialized.
24       An  implementation  may  cause  pthread_condattr_destroy()  to  set the
25       object referenced by  attr  to  an  invalid  value.  A  destroyed  attr
26       attributes  object  can be reinitialized using pthread_condattr_init();
27       the results of otherwise referencing  the  object  after  it  has  been
28       destroyed are undefined.
29
30       The pthread_condattr_init() function shall initialize a condition vari‐
31       able attributes object attr with the  default  value  for  all  of  the
32       attributes defined by the implementation.
33
34       Results  are  undefined if pthread_condattr_init() is called specifying
35       an already initialized attr attributes object.
36
37       After a condition variable attributes object has been used to  initial‐
38       ize  one  or  more  condition  variables,  any  function  affecting the
39       attributes object (including destruction) shall not affect  any  previ‐
40       ously initialized condition variables.
41
42       This   volume  of  POSIX.1‐2017  requires  two  attributes,  the  clock
43       attribute and the process-shared attribute.
44
45       Additional attributes, their default values, and the names of the asso‐
46       ciated  functions to get and set those attribute values are implementa‐
47       tion-defined.
48
49       The behavior is undefined if the value specified by the  attr  argument
50       to  pthread_condattr_destroy()  does not refer to an initialized condi‐
51       tion variable attributes object.
52

RETURN VALUE

54       If  successful,   the   pthread_condattr_destroy()   and   pthread_con‐
55       dattr_init()  functions  shall  return zero; otherwise, an error number
56       shall be returned to indicate the error.
57

ERRORS

59       The pthread_condattr_init() function shall fail if:
60
61       ENOMEM Insufficient memory exists to initialize the condition  variable
62              attributes object.
63
64       These functions shall not return an error code of [EINTR].
65
66       The following sections are informative.
67

EXAMPLES

69       None.
70

APPLICATION USAGE

72       None.
73

RATIONALE

75       A process-shared attribute has been defined for condition variables for
76       the same reason it has been defined for mutexes.
77
78       If an implementation detects that the value specified by the attr argu‐
79       ment  to  pthread_condattr_destroy()  does  not refer to an initialized
80       condition variable attributes object, it is recommended that the  func‐
81       tion should fail and report an [EINVAL] error.
82
83       See also pthread_attr_destroy() and pthread_mutex_destroy().
84

FUTURE DIRECTIONS

86       None.
87

SEE ALSO

89       pthread_attr_destroy(), pthread_cond_destroy(), pthread_condattr_getp‐
90       shared(), pthread_create(), pthread_mutex_destroy()
91
92       The Base Definitions volume of POSIX.1‐2017, <pthread.h>
93
95       Portions of this text are reprinted and reproduced in  electronic  form
96       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
97       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
98       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
99       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
100       event of any discrepancy between this version and the original IEEE and
101       The Open Group Standard, the original IEEE and The Open Group  Standard
102       is  the  referee document. The original Standard can be obtained online
103       at http://www.opengroup.org/unix/online.html .
104
105       Any typographical or formatting errors that appear  in  this  page  are
106       most likely to have been introduced during the conversion of the source
107       files to man page format. To report such errors,  see  https://www.ker
108       nel.org/doc/man-pages/reporting_bugs.html .
109
110
111
112IEEE/The Open Group                  2017         PTHREAD_CONDATTR_DESTROY(3P)
Impressum