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_rwlockattr_getpshared.3p (3927B)


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