Home | History | Annotate | Download | only in include
      1 /*
      2    Copyright (c) 2011 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_THREAD_SAFE_FUNCTIONS
    133   Affected functions are
    134 
    135   readdir_r(),
    136   getgrgid_r(),
    137   getgrnam_r(),
    138   getpwnam_r(),
    139   getpwuid_r(),
    140   flockfile(),
    141   ftrylockfile(),
    142   funlockfile(),
    143   getc_unlocked(),
    144   getchar_unlocked(),
    145   putc_unlocked(),
    146   putchar_unlocked(),
    147   strerror_r(),
    148 */
    149 #undef _POSIX_THREAD_SAFE_FUNCTIONS
    150 #define _POSIX_THREAD_SAFE_FUNCTIONS 200112L
    151 
    152 /* _SC_TIMEOUTS
    153   The functions
    154 
    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(),
    161   sem_timedwait(),
    162 
    163   are present. */
    164 #undef _POSIX_TIMEOUTS
    165 #define _POSIX_TIMEOUTS 200112L
    166 
    167 /* _SC_TIMERS - not supported
    168   The functions
    169 
    170   clock_getres(),
    171   clock_gettime(),
    172   clock_settime(),
    173   nanosleep(),
    174   timer_create(),
    175   timer_delete(),
    176   timer_gettime(),
    177   timer_getoverrun(),
    178   timer_settime()
    179 
    180   are present.  */
    181 /* #undef _POSIX_TIMERS */
    182 
    183 /* _SC_CLOCK_SELECTION
    184    This option implies the _POSIX_TIMERS option. The functions
    185 
    186    pthread_condattr_getclock(),
    187    pthread_condattr_setclock(),
    188    clock_nanosleep()
    189 
    190    are present.
    191 */
    192 #undef _POSIX_CLOCK_SELECTION
    193 #define _POSIX_CLOCK_SELECTION 200112
    194 
    195 /* _SC_SEMAPHORES
    196   The include file <semaphore.h> is present. The functions
    197 
    198   sem_close(),
    199   sem_destroy(),
    200   sem_getvalue(),
    201   sem_init(),
    202   sem_open(),
    203   sem_post(),
    204   sem_trywait(),
    205   sem_unlink(),
    206   sem_wait()
    207 
    208   are present. */
    209 #undef _POSIX_SEMAPHORES
    210 #define _POSIX_SEMAPHORES 200112
    211 
    212 #endif /* WIN_PTHREADS_UNISTD_H */
    213