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
21

DESCRIPTION

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 IEEE Std 1003.1-2001 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

RETURN VALUE

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

ERRORS

56       The pthread_condattr_destroy() function may fail if:
57
58       EINVAL The value specified by attr is invalid.
59
60
61       The pthread_condattr_init() function shall fail if:
62
63       ENOMEM Insufficient memory exists to initialize the condition  variable
64              attributes object.
65
66
67       These functions shall not return an error code of [EINTR].
68
69       The following sections are informative.
70

EXAMPLES

72       None.
73

APPLICATION USAGE

75       None.
76

RATIONALE

78       See pthread_attr_init() and pthread_mutex_init().
79
80       A process-shared attribute has been defined for condition variables for
81       the same reason it has been defined for mutexes.
82

FUTURE DIRECTIONS

84       None.
85

SEE ALSO

87       pthread_attr_destroy(), pthread_cond_destroy(),  pthread_condattr_getp‐
88       shared(),  pthread_create(),  pthread_mutex_destroy(), the Base Defini‐
89       tions volume of IEEE Std 1003.1-2001, <pthread.h>
90
92       Portions of this text are reprinted and reproduced in  electronic  form
93       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
94       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
95       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
96       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
97       event of any discrepancy between this version and the original IEEE and
98       The Open Group Standard, the original IEEE and The Open Group  Standard
99       is  the  referee document. The original Standard can be obtained online
100       at http://www.opengroup.org/unix/online.html .
101
102
103
104IEEE/The Open Group                  2003         PTHREAD_CONDATTR_DESTROY(3P)
Impressum