• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2    Copyright (c) 2011-2016  mingw-w64 project
3 
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:
10 
11    The above copyright notice and this permission notice shall be included in
12    all copies or substantial portions of the Software.
13 
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.
21 */
22 
23 #ifndef WIN_PTHREADS_UNISTD_H
24 #define WIN_PTHREADS_UNISTD_H
25 
26 /* Set defines described by the POSIX Threads Extension (1003.1c-1995) */
27 /* _SC_THREADS
28   Basic support for POSIX threads is available. The functions
29 
30   pthread_atfork(),
31   pthread_attr_destroy(),
32   pthread_attr_getdetachstate(),
33   pthread_attr_getschedparam(),
34   pthread_attr_init(),
35   pthread_attr_setdetachstate(),
36   pthread_attr_setschedparam(),
37   pthread_cancel(),
38   pthread_cleanup_push(),
39   pthread_cleanup_pop(),
40   pthread_cond_broadcast(),
41   pthread_cond_destroy(),
42   pthread_cond_init(),
43   pthread_cond_signal(),
44   pthread_cond_timedwait(),
45   pthread_cond_wait(),
46   pthread_condattr_destroy(),
47   pthread_condattr_init(),
48   pthread_create(),
49   pthread_detach(),
50   pthread_equal(),
51   pthread_exit(),
52   pthread_getspecific(),
53   pthread_join(,
54   pthread_key_create(),
55   pthread_key_delete(),
56   pthread_mutex_destroy(),
57   pthread_mutex_init(),
58   pthread_mutex_lock(),
59   pthread_mutex_trylock(),
60   pthread_mutex_unlock(),
61   pthread_mutexattr_destroy(),
62   pthread_mutexattr_init(),
63   pthread_once(),
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(),
73   pthread_self(),
74   pthread_setcancelstate(),
75   pthread_setcanceltype(),
76   pthread_setspecific(),
77   pthread_testcancel()
78 
79   are present. */
80 #undef _POSIX_THREADS
81 #define _POSIX_THREADS 200112L
82 
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.
86 
87   The functions
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()
97 
98   are present.
99 */
100 #undef _POSIX_READER_WRITER_LOCKS
101 #define _POSIX_READER_WRITER_LOCKS 200112L
102 
103 /* _SC_SPIN_LOCKS
104   This option implies the _POSIX_THREADS and _POSIX_THREAD_SAFE_FUNCTIONS
105   options. The functions
106 
107   pthread_spin_destroy(),
108   pthread_spin_init(),
109   pthread_spin_lock(),
110   pthread_spin_trylock(),
111   pthread_spin_unlock()
112 
113   are present. */
114 #undef _POSIX_SPIN_LOCKS
115 #define _POSIX_SPIN_LOCKS 200112L
116 
117 /* _SC_BARRIERS
118   This option implies the _POSIX_THREADS and _POSIX_THREAD_SAFE_FUNCTIONS
119   options. The functions
120 
121   pthread_barrier_destroy(),
122   pthread_barrier_init(),
123   pthread_barrier_wait(),
124   pthread_barrierattr_destroy(),
125   pthread_barrierattr_init()
126 
127   are present.
128 */
129 #undef _POSIX_BARRIERS
130 #define _POSIX_BARRIERS 200112L
131 
132 /* _SC_TIMEOUTS
133   The functions
134 
135   mq_timedreceive(), - not supported
136   mq_timedsend(), - not supported
137   posix_trace_timedgetnext_event(), - not supported
138   pthread_mutex_timedlock(),
139   pthread_rwlock_timedrdlock(),
140   pthread_rwlock_timedwrlock(),
141   sem_timedwait(),
142 
143   are present. */
144 #undef _POSIX_TIMEOUTS
145 #define _POSIX_TIMEOUTS 200112L
146 
147 /* _SC_TIMERS - not supported
148   The functions
149 
150   clock_getres(),
151   clock_gettime(),
152   clock_settime(),
153   nanosleep(),
154   timer_create(),
155   timer_delete(),
156   timer_gettime(),
157   timer_getoverrun(),
158   timer_settime()
159 
160   are present.  */
161 /* #undef _POSIX_TIMERS */
162 
163 /* _SC_CLOCK_SELECTION
164    This option implies the _POSIX_TIMERS option. The functions
165 
166    pthread_condattr_getclock(),
167    pthread_condattr_setclock(),
168    clock_nanosleep()
169 
170    are present.
171 */
172 #undef _POSIX_CLOCK_SELECTION
173 #define _POSIX_CLOCK_SELECTION 200112
174 
175 /* _SC_SEMAPHORES
176   The include file <semaphore.h> is present. The functions
177 
178   sem_close(),
179   sem_destroy(),
180   sem_getvalue(),
181   sem_init(),
182   sem_open(),
183   sem_post(),
184   sem_trywait(),
185   sem_unlink(),
186   sem_wait()
187 
188   are present. */
189 #undef _POSIX_SEMAPHORES
190 #define _POSIX_SEMAPHORES 200112
191 
192 #endif /* WIN_PTHREADS_UNISTD_H */
193