2 Copyright (c) 2011 mingw-w64 project
4 Permission is hereby granted, free of charge, to any person obtaining a
5 copy of this software and associated documentation files (the "Software"),
6 to deal in the Software without restriction, including without limitation
7 the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 and/or sell copies of the Software, and to permit persons to whom the
9 Software is furnished to do so, subject to the following conditions:
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 DEALINGS IN THE SOFTWARE.
23 #ifndef WIN_PTHREADS_UNISTD_H
24 #define WIN_PTHREADS_UNISTD_H
26 /* Set defines described by the POSIX Threads Extension (1003.1c-1995) */
28 Basic support for POSIX threads is available. The functions
31 pthread_attr_destroy(),
32 pthread_attr_getdetachstate(),
33 pthread_attr_getschedparam(),
35 pthread_attr_setdetachstate(),
36 pthread_attr_setschedparam(),
38 pthread_cleanup_push(),
39 pthread_cleanup_pop(),
40 pthread_cond_broadcast(),
41 pthread_cond_destroy(),
43 pthread_cond_signal(),
44 pthread_cond_timedwait(),
46 pthread_condattr_destroy(),
47 pthread_condattr_init(),
52 pthread_getspecific(),
56 pthread_mutex_destroy(),
59 pthread_mutex_trylock(),
60 pthread_mutex_unlock(),
61 pthread_mutexattr_destroy(),
62 pthread_mutexattr_init(),
64 pthread_rwlock_destroy(),
65 pthread_rwlock_init(),
66 pthread_rwlock_rdlock(),
67 pthread_rwlock_tryrdlock(),
68 pthread_rwlock_trywrlock(),
69 pthread_rwlock_unlock(),
70 pthread_rwlock_wrlock(),
71 pthread_rwlockattr_destroy(),
72 pthread_rwlockattr_init(),
74 pthread_setcancelstate(),
75 pthread_setcanceltype(),
76 pthread_setspecific(),
81 #define _POSIX_THREADS 200112L
83 /* _SC_READER_WRITER_LOCKS
84 This option implies the _POSIX_THREADS option. Conversely, under
85 POSIX 1003.1-2001 the _POSIX_THREADS option implies this option.
88 pthread_rwlock_destroy(),
89 pthread_rwlock_init(),
90 pthread_rwlock_rdlock(),
91 pthread_rwlock_tryrdlock(),
92 pthread_rwlock_trywrlock(),
93 pthread_rwlock_unlock(),
94 pthread_rwlock_wrlock(),
95 pthread_rwlockattr_destroy(),
96 pthread_rwlockattr_init()
100 #undef _POSIX_READER_WRITER_LOCKS
101 #define _POSIX_READER_WRITER_LOCKS 200112L
104 This option implies the _POSIX_THREADS and _POSIX_THREAD_SAFE_FUNCTIONS
105 options. The functions
107 pthread_spin_destroy(),
110 pthread_spin_trylock(),
111 pthread_spin_unlock()
114 #undef _POSIX_SPIN_LOCKS
115 #define _POSIX_SPIN_LOCKS 200112L
118 This option implies the _POSIX_THREADS and _POSIX_THREAD_SAFE_FUNCTIONS
119 options. The functions
121 pthread_barrier_destroy(),
122 pthread_barrier_init(),
123 pthread_barrier_wait(),
124 pthread_barrierattr_destroy(),
125 pthread_barrierattr_init()
129 #undef _POSIX_BARRIERS
130 #define _POSIX_BARRIERS 200112L
132 /* _SC_THREAD_SAFE_FUNCTIONS
133 Affected functions are
149 #undef _POSIX_THREAD_SAFE_FUNCTIONS
150 #define _POSIX_THREAD_SAFE_FUNCTIONS 200112L
155 mq_timedreceive(), - not supported
156 mq_timedsend(), - not supported
157 posix_trace_timedgetnext_event(), - not supported
158 pthread_mutex_timedlock(),
159 pthread_rwlock_timedrdlock(),
160 pthread_rwlock_timedwrlock(),
164 #undef _POSIX_TIMEOUTS
165 #define _POSIX_TIMEOUTS 200112L
167 /* _SC_TIMERS - not supported
181 /* #undef _POSIX_TIMERS */
183 /* _SC_CLOCK_SELECTION
184 This option implies the _POSIX_TIMERS option. The functions
186 pthread_condattr_getclock(),
187 pthread_condattr_setclock(),
192 #undef _POSIX_CLOCK_SELECTION
193 #define _POSIX_CLOCK_SELECTION 200112
196 The include file <semaphore.h> is present. The functions
209 #undef _POSIX_SEMAPHORES
210 #define _POSIX_SEMAPHORES 200112
212 #endif /* WIN_PTHREADS_UNISTD_H */