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_barrierattr_getpshared.3p (4427B)


  1. '\" et
  2. .TH PTHREAD_BARRIERATTR_GETPSHARED "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_barrierattr_getpshared,
  12. pthread_barrierattr_setpshared
  13. \(em get and set the process-shared attribute of the barrier
  14. attributes object
  15. .SH SYNOPSIS
  16. .LP
  17. .nf
  18. #include <pthread.h>
  19. .P
  20. int pthread_barrierattr_getpshared(const pthread_barrierattr_t
  21. *restrict \fIattr\fP, int *restrict \fIpshared\fP);
  22. int pthread_barrierattr_setpshared(pthread_barrierattr_t *\fIattr\fP,
  23. int \fIpshared\fP);
  24. .fi
  25. .SH DESCRIPTION
  26. The
  27. \fIpthread_barrierattr_getpshared\fR()
  28. function shall obtain the value of the
  29. .IR process-shared
  30. attribute from the attributes object referenced by
  31. .IR attr .
  32. The
  33. \fIpthread_barrierattr_setpshared\fR()
  34. function shall set the
  35. .IR process-shared
  36. attribute in an initialized attributes object referenced by
  37. .IR attr .
  38. .P
  39. The
  40. .IR process-shared
  41. attribute is set to PTHREAD_PROCESS_SHARED to
  42. permit a barrier to be operated upon by any thread that has access to
  43. the memory where the barrier is allocated. See
  44. .IR "Section 2.9.9" ", " "Synchronization Object Copies and Alternative Mappings"
  45. for further requirements. The default value of the attribute
  46. shall be PTHREAD_PROCESS_PRIVATE. Both constants
  47. PTHREAD_PROCESS_SHARED and PTHREAD_PROCESS_PRIVATE are defined in
  48. .IR <pthread.h> .
  49. .P
  50. Additional attributes, their default values, and the names of the
  51. associated functions to get and set those attribute values are
  52. implementation-defined.
  53. .P
  54. The behavior is undefined if the value specified by the
  55. .IR attr
  56. argument to
  57. \fIpthread_barrierattr_getpshared\fR()
  58. or
  59. \fIpthread_barrierattr_setpshared\fR()
  60. does not refer to an initialized barrier attributes object.
  61. .SH "RETURN VALUE"
  62. If successful, the
  63. \fIpthread_barrierattr_getpshared\fR()
  64. function shall return zero and store the value of the
  65. .IR process-shared
  66. attribute of
  67. .IR attr
  68. into the object referenced by the
  69. .IR pshared
  70. parameter. Otherwise, an error number shall be returned to indicate
  71. the error.
  72. .P
  73. If successful, the
  74. \fIpthread_barrierattr_setpshared\fR()
  75. function shall return zero; otherwise, an error number shall be
  76. returned to indicate the error.
  77. .SH ERRORS
  78. The
  79. \fIpthread_barrierattr_setpshared\fR()
  80. function may fail if:
  81. .TP
  82. .BR EINVAL
  83. The new value specified for the
  84. .IR process-shared
  85. attribute is not one of the legal values PTHREAD_PROCESS_SHARED
  86. or PTHREAD_PROCESS_PRIVATE.
  87. .P
  88. These functions shall not return an error code of
  89. .BR [EINTR] .
  90. .LP
  91. .IR "The following sections are informative."
  92. .SH EXAMPLES
  93. None.
  94. .SH "APPLICATION USAGE"
  95. The
  96. \fIpthread_barrierattr_getpshared\fR()
  97. and
  98. \fIpthread_barrierattr_setpshared\fR()
  99. functions are part of the Thread Process-Shared Synchronization
  100. option and need not be provided on all implementations.
  101. .SH RATIONALE
  102. If an implementation detects that the value specified by the
  103. .IR attr
  104. argument to
  105. \fIpthread_barrierattr_getpshared\fR()
  106. or
  107. \fIpthread_barrierattr_setpshared\fR()
  108. does not refer to an initialized barrier attributes object, it is
  109. recommended that the function should fail and report an
  110. .BR [EINVAL]
  111. error.
  112. .SH "FUTURE DIRECTIONS"
  113. None.
  114. .SH "SEE ALSO"
  115. .ad l
  116. .IR "\fIpthread_barrier_destroy\fR\^(\|)",
  117. .IR "\fIpthread_barrierattr_destroy\fR\^(\|)"
  118. .ad b
  119. .P
  120. The Base Definitions volume of POSIX.1\(hy2017,
  121. .IR "\fB<pthread.h>\fP"
  122. .\"
  123. .SH COPYRIGHT
  124. Portions of this text are reprinted and reproduced in electronic form
  125. from IEEE Std 1003.1-2017, Standard for Information Technology
  126. -- Portable Operating System Interface (POSIX), The Open Group Base
  127. Specifications Issue 7, 2018 Edition,
  128. Copyright (C) 2018 by the Institute of
  129. Electrical and Electronics Engineers, Inc and The Open Group.
  130. In the event of any discrepancy between this version and the original IEEE and
  131. The Open Group Standard, the original IEEE and The Open Group Standard
  132. is the referee document. The original Standard can be obtained online at
  133. http://www.opengroup.org/unix/online.html .
  134. .PP
  135. Any typographical or formatting errors that appear
  136. in this page are most likely
  137. to have been introduced during the conversion of the source files to
  138. man page format. To report such errors, see
  139. https://www.kernel.org/doc/man-pages/reporting_bugs.html .