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_spin_unlock.3p (3074B)


  1. '\" et
  2. .TH PTHREAD_SPIN_UNLOCK "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_spin_unlock
  12. \(em unlock a spin lock object
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <pthread.h>
  17. .P
  18. int pthread_spin_unlock(pthread_spinlock_t *\fIlock\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. \fIpthread_spin_unlock\fR()
  23. function shall release the spin lock referenced by
  24. .IR lock
  25. which was locked via the
  26. \fIpthread_spin_lock\fR()
  27. or
  28. \fIpthread_spin_trylock\fR()
  29. functions.
  30. .P
  31. The results are undefined if the lock is not held by the
  32. calling thread.
  33. .P
  34. If there are threads spinning on the lock when
  35. \fIpthread_spin_unlock\fR()
  36. is called, the lock becomes available and an unspecified spinning
  37. thread shall acquire the lock.
  38. .P
  39. The results are undefined if this function is called with an
  40. uninitialized thread spin lock.
  41. .SH "RETURN VALUE"
  42. Upon successful completion, the
  43. \fIpthread_spin_unlock\fR()
  44. function shall return zero; otherwise, an error number shall be
  45. returned to indicate the error.
  46. .SH ERRORS
  47. This function shall not return an error code of
  48. .BR [EINTR] .
  49. .LP
  50. .IR "The following sections are informative."
  51. .SH EXAMPLES
  52. None.
  53. .SH "APPLICATION USAGE"
  54. None.
  55. .SH RATIONALE
  56. If an implementation detects that the value specified by the
  57. .IR lock
  58. argument to
  59. \fIpthread_spin_unlock\fR()
  60. does not refer to an initialized spin lock object, it is recommended
  61. that the function should fail and report an
  62. .BR [EINVAL]
  63. error.
  64. .P
  65. If an implementation detects that the value specified by the
  66. .IR lock
  67. argument to
  68. \fIpthread_spin_unlock\fR()
  69. refers to a spin lock object for which the current thread does not
  70. hold the lock, it is recommended that the function should fail
  71. and report an
  72. .BR [EPERM]
  73. error.
  74. .SH "FUTURE DIRECTIONS"
  75. None.
  76. .SH "SEE ALSO"
  77. .IR "\fIpthread_spin_destroy\fR\^(\|)",
  78. .IR "\fIpthread_spin_lock\fR\^(\|)"
  79. .P
  80. The Base Definitions volume of POSIX.1\(hy2017,
  81. .IR "Section 4.12" ", " "Memory Synchronization",
  82. .IR "\fB<pthread.h>\fP"
  83. .\"
  84. .SH COPYRIGHT
  85. Portions of this text are reprinted and reproduced in electronic form
  86. from IEEE Std 1003.1-2017, Standard for Information Technology
  87. -- Portable Operating System Interface (POSIX), The Open Group Base
  88. Specifications Issue 7, 2018 Edition,
  89. Copyright (C) 2018 by the Institute of
  90. Electrical and Electronics Engineers, Inc and The Open Group.
  91. In the event of any discrepancy between this version and the original IEEE and
  92. The Open Group Standard, the original IEEE and The Open Group Standard
  93. is the referee document. The original Standard can be obtained online at
  94. http://www.opengroup.org/unix/online.html .
  95. .PP
  96. Any typographical or formatting errors that appear
  97. in this page are most likely
  98. to have been introduced during the conversion of the source files to
  99. man page format. To report such errors, see
  100. https://www.kernel.org/doc/man-pages/reporting_bugs.html .