pthread_unistd.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. /*
  2. Copyright (c) 2011-2016 mingw-w64 project
  3. Permission is hereby granted, free of charge, to any person obtaining a
  4. copy of this software and associated documentation files (the "Software"),
  5. to deal in the Software without restriction, including without limitation
  6. the rights to use, copy, modify, merge, publish, distribute, sublicense,
  7. and/or sell copies of the Software, and to permit persons to whom the
  8. Software is furnished to do so, subject to the following conditions:
  9. The above copyright notice and this permission notice shall be included in
  10. all copies or substantial portions of the Software.
  11. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  14. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  15. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  16. FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  17. DEALINGS IN THE SOFTWARE.
  18. */
  19. #ifndef WIN_PTHREADS_UNISTD_H
  20. #define WIN_PTHREADS_UNISTD_H
  21. /* Set defines described by the POSIX Threads Extension (1003.1c-1995) */
  22. /* _SC_THREADS
  23. Basic support for POSIX threads is available. The functions
  24. pthread_atfork(),
  25. pthread_attr_destroy(),
  26. pthread_attr_getdetachstate(),
  27. pthread_attr_getschedparam(),
  28. pthread_attr_init(),
  29. pthread_attr_setdetachstate(),
  30. pthread_attr_setschedparam(),
  31. pthread_cancel(),
  32. pthread_cleanup_push(),
  33. pthread_cleanup_pop(),
  34. pthread_cond_broadcast(),
  35. pthread_cond_destroy(),
  36. pthread_cond_init(),
  37. pthread_cond_signal(),
  38. pthread_cond_timedwait(),
  39. pthread_cond_wait(),
  40. pthread_condattr_destroy(),
  41. pthread_condattr_init(),
  42. pthread_create(),
  43. pthread_detach(),
  44. pthread_equal(),
  45. pthread_exit(),
  46. pthread_getspecific(),
  47. pthread_join(,
  48. pthread_key_create(),
  49. pthread_key_delete(),
  50. pthread_mutex_destroy(),
  51. pthread_mutex_init(),
  52. pthread_mutex_lock(),
  53. pthread_mutex_trylock(),
  54. pthread_mutex_unlock(),
  55. pthread_mutexattr_destroy(),
  56. pthread_mutexattr_init(),
  57. pthread_once(),
  58. pthread_rwlock_destroy(),
  59. pthread_rwlock_init(),
  60. pthread_rwlock_rdlock(),
  61. pthread_rwlock_tryrdlock(),
  62. pthread_rwlock_trywrlock(),
  63. pthread_rwlock_unlock(),
  64. pthread_rwlock_wrlock(),
  65. pthread_rwlockattr_destroy(),
  66. pthread_rwlockattr_init(),
  67. pthread_self(),
  68. pthread_setcancelstate(),
  69. pthread_setcanceltype(),
  70. pthread_setspecific(),
  71. pthread_testcancel()
  72. are present. */
  73. #undef _POSIX_THREADS
  74. #define _POSIX_THREADS 200112L
  75. /* _SC_READER_WRITER_LOCKS
  76. This option implies the _POSIX_THREADS option. Conversely, under
  77. POSIX 1003.1-2001 the _POSIX_THREADS option implies this option.
  78. The functions
  79. pthread_rwlock_destroy(),
  80. pthread_rwlock_init(),
  81. pthread_rwlock_rdlock(),
  82. pthread_rwlock_tryrdlock(),
  83. pthread_rwlock_trywrlock(),
  84. pthread_rwlock_unlock(),
  85. pthread_rwlock_wrlock(),
  86. pthread_rwlockattr_destroy(),
  87. pthread_rwlockattr_init()
  88. are present.
  89. */
  90. #undef _POSIX_READER_WRITER_LOCKS
  91. #define _POSIX_READER_WRITER_LOCKS 200112L
  92. /* _SC_SPIN_LOCKS
  93. This option implies the _POSIX_THREADS and _POSIX_THREAD_SAFE_FUNCTIONS
  94. options. The functions
  95. pthread_spin_destroy(),
  96. pthread_spin_init(),
  97. pthread_spin_lock(),
  98. pthread_spin_trylock(),
  99. pthread_spin_unlock()
  100. are present. */
  101. #undef _POSIX_SPIN_LOCKS
  102. #define _POSIX_SPIN_LOCKS 200112L
  103. /* _SC_BARRIERS
  104. This option implies the _POSIX_THREADS and _POSIX_THREAD_SAFE_FUNCTIONS
  105. options. The functions
  106. pthread_barrier_destroy(),
  107. pthread_barrier_init(),
  108. pthread_barrier_wait(),
  109. pthread_barrierattr_destroy(),
  110. pthread_barrierattr_init()
  111. are present.
  112. */
  113. #undef _POSIX_BARRIERS
  114. #define _POSIX_BARRIERS 200112L
  115. /* _SC_TIMEOUTS
  116. The functions
  117. mq_timedreceive(), - not supported
  118. mq_timedsend(), - not supported
  119. posix_trace_timedgetnext_event(), - not supported
  120. pthread_mutex_timedlock(),
  121. pthread_rwlock_timedrdlock(),
  122. pthread_rwlock_timedwrlock(),
  123. sem_timedwait(),
  124. are present. */
  125. #undef _POSIX_TIMEOUTS
  126. #define _POSIX_TIMEOUTS 200112L
  127. /* _SC_TIMERS - not supported
  128. The functions
  129. clock_getres(),
  130. clock_gettime(),
  131. clock_settime(),
  132. nanosleep(),
  133. timer_create(),
  134. timer_delete(),
  135. timer_gettime(),
  136. timer_getoverrun(),
  137. timer_settime()
  138. are present. */
  139. /* #undef _POSIX_TIMERS */
  140. /* _SC_CLOCK_SELECTION
  141. This option implies the _POSIX_TIMERS option. The functions
  142. pthread_condattr_getclock(),
  143. pthread_condattr_setclock(),
  144. clock_nanosleep()
  145. are present.
  146. */
  147. #undef _POSIX_CLOCK_SELECTION
  148. #define _POSIX_CLOCK_SELECTION 200112
  149. /* _SC_SEMAPHORES
  150. The include file <semaphore.h> is present. The functions
  151. sem_close(),
  152. sem_destroy(),
  153. sem_getvalue(),
  154. sem_init(),
  155. sem_open(),
  156. sem_post(),
  157. sem_trywait(),
  158. sem_unlink(),
  159. sem_wait()
  160. are present. */
  161. #undef _POSIX_SEMAPHORES
  162. #define _POSIX_SEMAPHORES 200112
  163. #endif /* WIN_PTHREADS_UNISTD_H */