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_equal.3p (2536B)


  1. '\" et
  2. .TH PTHREAD_EQUAL "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_equal
  12. \(em compare thread IDs
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <pthread.h>
  17. .P
  18. int pthread_equal(pthread_t \fIt1\fP, pthread_t \fIt2\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. This function shall compare the thread IDs
  22. .IR t1
  23. and
  24. .IR t2 .
  25. .SH "RETURN VALUE"
  26. The
  27. \fIpthread_equal\fR()
  28. function shall return a non-zero value if
  29. .IR t1
  30. and
  31. .IR t2
  32. are equal; otherwise, zero shall be returned.
  33. .P
  34. If either
  35. .IR t1
  36. or
  37. .IR t2
  38. are not valid thread IDs, the behavior is undefined.
  39. .SH ERRORS
  40. No errors are defined.
  41. .P
  42. The
  43. \fIpthread_equal\fR()
  44. function shall not return an error code of
  45. .BR [EINTR] .
  46. .LP
  47. .IR "The following sections are informative."
  48. .SH EXAMPLES
  49. None.
  50. .SH "APPLICATION USAGE"
  51. None.
  52. .SH RATIONALE
  53. Implementations may choose to define a
  54. thread ID as a structure. This allows additional flexibility and
  55. robustness over using an
  56. .BR int .
  57. For example, a thread ID could include a sequence number that allows
  58. detection of ``dangling IDs'' (copies of a thread ID that has been
  59. detached). Since the C language does not support comparison on
  60. structure types, the
  61. \fIpthread_equal\fR()
  62. function is provided to compare thread IDs.
  63. .SH "FUTURE DIRECTIONS"
  64. None.
  65. .SH "SEE ALSO"
  66. .IR "\fIpthread_create\fR\^(\|)",
  67. .IR "\fIpthread_self\fR\^(\|)"
  68. .P
  69. The Base Definitions volume of POSIX.1\(hy2017,
  70. .IR "\fB<pthread.h>\fP"
  71. .\"
  72. .SH COPYRIGHT
  73. Portions of this text are reprinted and reproduced in electronic form
  74. from IEEE Std 1003.1-2017, Standard for Information Technology
  75. -- Portable Operating System Interface (POSIX), The Open Group Base
  76. Specifications Issue 7, 2018 Edition,
  77. Copyright (C) 2018 by the Institute of
  78. Electrical and Electronics Engineers, Inc and The Open Group.
  79. In the event of any discrepancy between this version and the original IEEE and
  80. The Open Group Standard, the original IEEE and The Open Group Standard
  81. is the referee document. The original Standard can be obtained online at
  82. http://www.opengroup.org/unix/online.html .
  83. .PP
  84. Any typographical or formatting errors that appear
  85. in this page are most likely
  86. to have been introduced during the conversion of the source files to
  87. man page format. To report such errors, see
  88. https://www.kernel.org/doc/man-pages/reporting_bugs.html .