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_destroy.3p (3742B)


  1. '\" et
  2. .TH PTHREAD_RWLOCKATTR_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_rwlockattr_destroy,
  12. pthread_rwlockattr_init
  13. \(em destroy and initialize the read-write lock attributes object
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <pthread.h>
  18. .P
  19. int pthread_rwlockattr_destroy(pthread_rwlockattr_t *\fIattr\fP);
  20. int pthread_rwlockattr_init(pthread_rwlockattr_t *\fIattr\fP);
  21. .fi
  22. .SH DESCRIPTION
  23. The
  24. \fIpthread_rwlockattr_destroy\fR()
  25. function shall destroy a read-write lock attributes object. A destroyed
  26. .IR attr
  27. attributes object can be reinitialized using
  28. \fIpthread_rwlockattr_init\fR();
  29. the results of otherwise referencing the object after it
  30. has been destroyed are undefined. An implementation may cause
  31. \fIpthread_rwlockattr_destroy\fR()
  32. to set the object referenced by
  33. .IR attr
  34. to an invalid value.
  35. .P
  36. The
  37. \fIpthread_rwlockattr_init\fR()
  38. function shall initialize a read-write lock attributes object
  39. .IR attr
  40. with the default value for all of the attributes defined by the
  41. implementation.
  42. .P
  43. Results are undefined if
  44. \fIpthread_rwlockattr_init\fR()
  45. is called specifying an already initialized
  46. .IR attr
  47. attributes object.
  48. .P
  49. After a read-write lock attributes object has been used to initialize
  50. one or more read-write locks, any function affecting the attributes
  51. object (including destruction) shall not affect any previously
  52. initialized read-write locks.
  53. .P
  54. The behavior is undefined if the value specified by the
  55. .IR attr
  56. argument to
  57. \fIpthread_rwlockattr_destroy\fR()
  58. does not refer to an initialized read-write lock attributes object.
  59. .SH "RETURN VALUE"
  60. If successful, the
  61. \fIpthread_rwlockattr_destroy\fR()
  62. and
  63. \fIpthread_rwlockattr_init\fR()
  64. functions shall return zero; otherwise, an error number shall be
  65. returned to indicate the error.
  66. .SH ERRORS
  67. The
  68. \fIpthread_rwlockattr_init\fR()
  69. function shall fail if:
  70. .TP
  71. .BR ENOMEM
  72. Insufficient memory exists to initialize the read-write lock attributes
  73. object.
  74. .P
  75. These functions shall not return an error code of
  76. .BR [EINTR] .
  77. .LP
  78. .IR "The following sections are informative."
  79. .SH EXAMPLES
  80. None.
  81. .SH "APPLICATION USAGE"
  82. None.
  83. .SH RATIONALE
  84. If an implementation detects that the value specified by the
  85. .IR attr
  86. argument to
  87. \fIpthread_rwlockattr_destroy\fR()
  88. does not refer to an initialized read-write lock attributes object,
  89. it is recommended that the function should fail and report an
  90. .BR [EINVAL]
  91. error.
  92. .SH "FUTURE DIRECTIONS"
  93. None.
  94. .SH "SEE ALSO"
  95. .IR "\fIpthread_rwlock_destroy\fR\^(\|)",
  96. .IR "\fIpthread_rwlockattr_getpshared\fR\^(\|)"
  97. .P
  98. The Base Definitions volume of POSIX.1\(hy2017,
  99. .IR "\fB<pthread.h>\fP"
  100. .\"
  101. .SH COPYRIGHT
  102. Portions of this text are reprinted and reproduced in electronic form
  103. from IEEE Std 1003.1-2017, Standard for Information Technology
  104. -- Portable Operating System Interface (POSIX), The Open Group Base
  105. Specifications Issue 7, 2018 Edition,
  106. Copyright (C) 2018 by the Institute of
  107. Electrical and Electronics Engineers, Inc and The Open Group.
  108. In the event of any discrepancy between this version and the original IEEE and
  109. The Open Group Standard, the original IEEE and The Open Group Standard
  110. is the referee document. The original Standard can be obtained online at
  111. http://www.opengroup.org/unix/online.html .
  112. .PP
  113. Any typographical or formatting errors that appear
  114. in this page are most likely
  115. to have been introduced during the conversion of the source files to
  116. man page format. To report such errors, see
  117. https://www.kernel.org/doc/man-pages/reporting_bugs.html .