logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

pthread_condattr_destroy.3p (4405B)


  1. '\" et
  2. .TH PTHREAD_CONDATTR_DESTROY "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. pthread_condattr_destroy,
  12. pthread_condattr_init
  13. \(em destroy and initialize the condition variable attributes object
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <pthread.h>
  18. .P
  19. int pthread_condattr_destroy(pthread_condattr_t *\fIattr\fP);
  20. int pthread_condattr_init(pthread_condattr_t *\fIattr\fP);
  21. .fi
  22. .SH DESCRIPTION
  23. The
  24. \fIpthread_condattr_destroy\fR()
  25. function shall destroy a condition variable attributes object; the
  26. object becomes, in effect, uninitialized. An implementation may cause
  27. \fIpthread_condattr_destroy\fR()
  28. to set the object referenced by
  29. .IR attr
  30. to an invalid value. A destroyed
  31. .IR attr
  32. attributes object can be reinitialized using
  33. \fIpthread_condattr_init\fR();
  34. the results of otherwise referencing the object after it
  35. has been destroyed are undefined.
  36. .P
  37. The
  38. \fIpthread_condattr_init\fR()
  39. function shall initialize a condition variable attributes object
  40. .IR attr
  41. with the default value for all of the attributes defined by the
  42. implementation.
  43. .P
  44. Results are undefined if
  45. \fIpthread_condattr_init\fR()
  46. is called specifying an already initialized
  47. .IR attr
  48. attributes object.
  49. .P
  50. After a condition variable attributes object has been used to
  51. initialize one or more condition variables, any function affecting the
  52. attributes object (including destruction) shall not affect any
  53. previously initialized condition variables.
  54. .P
  55. This volume of POSIX.1\(hy2017 requires two attributes, the
  56. .IR clock
  57. attribute and the
  58. .IR process-shared
  59. attribute.
  60. .P
  61. Additional attributes, their default values, and the names of the
  62. associated functions to get and set those attribute values are
  63. implementation-defined.
  64. .P
  65. The behavior is undefined if the value specified by the
  66. .IR attr
  67. argument to
  68. \fIpthread_condattr_destroy\fR()
  69. does not refer to an initialized condition variable attributes object.
  70. .SH "RETURN VALUE"
  71. If successful, the
  72. \fIpthread_condattr_destroy\fR()
  73. and
  74. \fIpthread_condattr_init\fR()
  75. functions shall return zero; otherwise, an error number shall be
  76. returned to indicate the error.
  77. .SH ERRORS
  78. The
  79. \fIpthread_condattr_init\fR()
  80. function shall fail if:
  81. .TP
  82. .BR ENOMEM
  83. Insufficient memory exists to initialize the condition variable
  84. attributes object.
  85. .P
  86. These functions shall not return an error code of
  87. .BR [EINTR] .
  88. .LP
  89. .IR "The following sections are informative."
  90. .SH EXAMPLES
  91. None.
  92. .SH "APPLICATION USAGE"
  93. None.
  94. .SH RATIONALE
  95. A
  96. .IR process-shared
  97. attribute has been defined for condition variables for the same reason
  98. it has been defined for mutexes.
  99. .P
  100. If an implementation detects that the value specified by the
  101. .IR attr
  102. argument to
  103. \fIpthread_condattr_destroy\fR()
  104. does not refer to an initialized condition variable attributes object,
  105. it is recommended that the function should fail and report an
  106. .BR [EINVAL]
  107. error.
  108. .P
  109. See also
  110. .IR "\fIpthread_attr_destroy\fR\^(\|)"
  111. and
  112. .IR "\fIpthread_mutex_destroy\fR\^(\|)".
  113. .SH "FUTURE DIRECTIONS"
  114. None.
  115. .SH "SEE ALSO"
  116. .ad l
  117. .IR "\fIpthread_attr_destroy\fR\^(\|)",
  118. .IR "\fIpthread_cond_destroy\fR\^(\|)",
  119. .IR "\fIpthread_condattr_getpshared\fR\^(\|)",
  120. .IR "\fIpthread_create\fR\^(\|)",
  121. .IR "\fIpthread_mutex_destroy\fR\^(\|)"
  122. .ad b
  123. .P
  124. The Base Definitions volume of POSIX.1\(hy2017,
  125. .IR "\fB<pthread.h>\fP"
  126. .\"
  127. .SH COPYRIGHT
  128. Portions of this text are reprinted and reproduced in electronic form
  129. from IEEE Std 1003.1-2017, Standard for Information Technology
  130. -- Portable Operating System Interface (POSIX), The Open Group Base
  131. Specifications Issue 7, 2018 Edition,
  132. Copyright (C) 2018 by the Institute of
  133. Electrical and Electronics Engineers, Inc and The Open Group.
  134. In the event of any discrepancy between this version and the original IEEE and
  135. The Open Group Standard, the original IEEE and The Open Group Standard
  136. is the referee document. The original Standard can be obtained online at
  137. http://www.opengroup.org/unix/online.html .
  138. .PP
  139. Any typographical or formatting errors that appear
  140. in this page are most likely
  141. to have been introduced during the conversion of the source files to
  142. man page format. To report such errors, see
  143. https://www.kernel.org/doc/man-pages/reporting_bugs.html .