pthread_barrierattr_init.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML>
  3. <HEAD>
  4. <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
  5. <TITLE>&quot;PTHREAD_BARRIERATTR_DESTROY&quot;(P) manual page</TITLE>
  6. <META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.3 (Linux)">
  7. <META NAME="CREATED" CONTENT="20050504;11502600">
  8. <META NAME="CHANGED" CONTENT="20050505;18032300">
  9. <!-- manual page source format generated by PolyglotMan v3.2, -->
  10. <!-- available at http://polyglotman.sourceforge.net/ -->
  11. </HEAD>
  12. <BODY LANG="en-GB" BGCOLOR="#ffffff" DIR="LTR">
  13. <H4>POSIX Threads for Windows – REFERENCE - <A HREF="http://sources.redhat.com/pthreads-win32">Pthreads-w32</A></H4>
  14. <P><A HREF="index.html">Reference Index</A></P>
  15. <P><A HREF="#toc">Table of Contents</A></P>
  16. <H2><A HREF="#toc0" NAME="sect0">Name</A></H2>
  17. <P>pthread_barrierattr_destroy, pthread_barrierattr_init - destroy
  18. and initialize the barrier attributes object (<B>ADVANCED REALTIME
  19. THREADS</B>)
  20. </P>
  21. <H2><A HREF="#toc1" NAME="sect1">Synopsis</A></H2>
  22. <P><B>#include &lt;pthread.h&gt; </B>
  23. </P>
  24. <P>i<B>nt pthread_barrierattr_destroy(pthread_barrierattr_t *</B><I>attr</I><B>);
  25. <BR>int pthread_barrierattr_init(pthread_barrierattr_t *</B><I>attr</I><B>);
  26. </B>
  27. </P>
  28. <H2><A HREF="#toc2" NAME="sect2">Description</A></H2>
  29. <P>The <B>pthread_barrierattr_destroy</B> function shall destroy a
  30. barrier attributes object. A destroyed <I>attr</I> attributes object
  31. can be reinitialized using <B>pthread_barrierattr_init</B> ; the
  32. results of otherwise referencing the object after it has been
  33. destroyed are undefined. An implementation may cause
  34. <B>pthread_barrierattr_destroy</B> to set the object referenced by
  35. <I>attr</I> to an invalid value.
  36. </P>
  37. <P>The <B>pthread_barrierattr_init</B> function shall initialize a
  38. barrier attributes object <I>attr</I> with the default value for all
  39. of the attributes defined by the implementation.
  40. </P>
  41. <P>Results are undefined if <B>pthread_barrierattr_init</B> is called
  42. specifying an already initialized <I>attr</I> attributes object.
  43. </P>
  44. <P>After a barrier attributes object has been used to initialize one
  45. or more barriers, any function affecting the attributes object
  46. (including destruction) shall not affect any previously initialized
  47. barrier.
  48. </P>
  49. <H2><A HREF="#toc3" NAME="sect3">Return Value</A></H2>
  50. <P>If successful, the <B>pthread_barrierattr_destroy</B> and
  51. <B>pthread_barrierattr_init</B> functions shall return zero;
  52. otherwise, an error number shall be returned to indicate the error.
  53. </P>
  54. <H2><A HREF="#toc4" NAME="sect4">Errors</A></H2>
  55. <P>The <B>pthread_barrierattr_destroy</B> function may fail if:
  56. </P>
  57. <DL>
  58. <DT><B>EINVAL</B>
  59. </DT><DD STYLE="margin-bottom: 0.5cm">
  60. The value specified by <I>attr</I> is invalid.
  61. </DD></DL>
  62. <P>
  63. The <B>pthread_barrierattr_init</B> function shall fail if:
  64. </P>
  65. <DL>
  66. <DT><B>ENOMEM</B>
  67. </DT><DD STYLE="margin-bottom: 0.5cm">
  68. Insufficient memory exists to initialize the barrier attributes
  69. object.
  70. </DD></DL>
  71. <P>
  72. These functions shall not return an error code of [EINTR].
  73. </P>
  74. <P><I>The following sections are informative.</I>
  75. </P>
  76. <H2><A HREF="#toc5" NAME="sect5">Examples</A></H2>
  77. <P>None.
  78. </P>
  79. <H2><A HREF="#toc6" NAME="sect6">Application Usage</A></H2>
  80. <P>The <B>pthread_barrierattr_destroy</B> and
  81. <B>pthread_barrierattr_init</B> functions are part of the Barriers
  82. option and need not be provided on all implementations.
  83. </P>
  84. <P><B>Pthreads-w32</B> defines <B>_POSIX_BARRIERS</B> to indicate
  85. that these routines are implemented and may be used.</P>
  86. <H2><A HREF="#toc7" NAME="sect7">Rationale</A></H2>
  87. <P>None.
  88. </P>
  89. <H2><A HREF="#toc8" NAME="sect8">Future Directions</A></H2>
  90. <P>None.
  91. </P>
  92. <H2><A HREF="#toc9" NAME="sect9">See Also</A></H2>
  93. <P><A HREF="pthread_barrierattr_setpshared.html"><B>pthread_barrierattr_getpshared</B>(3)</A>
  94. <B>,</B> <A HREF="pthread_barrierattr_setpshared.html"><B>pthread_barrierattr_setpshared</B>(3)</A>
  95. , the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,
  96. <I>&lt;pthread.h&gt;</I>.
  97. </P>
  98. <H2><A HREF="#toc10" NAME="sect10">Copyright</A></H2>
  99. <P>Portions of this text are reprinted and reproduced in electronic
  100. form from IEEE Std 1003.1, 2003 Edition, Standard for Information
  101. Technology -- Portable Operating System Interface (POSIX), The Open
  102. Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the
  103. Institute of Electrical and Electronics Engineers, Inc and The Open
  104. Group. In the event of any discrepancy between this version and the
  105. original IEEE and The Open Group Standard, the original IEEE and The
  106. Open Group Standard is the referee document. The original Standard
  107. can be obtained online at <A HREF="http://www.opengroup.org/unix/online.html">http://www.opengroup.org/unix/online.html</A>
  108. .
  109. </P>
  110. <P>Modified by Ross Johnson for use with <A HREF="http://sources.redhat.com/pthreads-win32">Pthreads-w32</A>.</P>
  111. <HR>
  112. <P><A NAME="toc"></A><B>Table of Contents</B></P>
  113. <UL>
  114. <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect0" NAME="toc0">Name</A>
  115. </P>
  116. <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect1" NAME="toc1">Synopsis</A>
  117. </P>
  118. <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect2" NAME="toc2">Description</A>
  119. </P>
  120. <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect3" NAME="toc3">Return
  121. Value</A>
  122. </P>
  123. <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect4" NAME="toc4">Errors</A>
  124. </P>
  125. <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect5" NAME="toc5">Examples</A>
  126. </P>
  127. <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect6" NAME="toc6">Application
  128. Usage</A>
  129. </P>
  130. <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect7" NAME="toc7">Rationale</A>
  131. </P>
  132. <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect8" NAME="toc8">Future
  133. Directions</A>
  134. </P>
  135. <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect9" NAME="toc9">See
  136. Also</A>
  137. </P>
  138. <LI><P><A HREF="#sect10" NAME="toc10">Copyright</A>
  139. </P>
  140. </UL>
  141. </BODY>
  142. </HTML>