]> pd.if.org Git - pdclib.old/blob - opt/pthreads/_PDCLIB_threadconfig.h
[gandr] split _PDCLIB_stdinit to better separate stdio and locale
[pdclib.old] / opt / pthreads / _PDCLIB_threadconfig.h
1 #ifndef _PDCLIB_THREADCONFIG_H
2 #define _PDCLIB_THREADCONFIG_H
3 #include <_PDCLIB_aux.h>
4 #include <_PDCLIB_config.h>
5
6 #ifdef __APPLE__
7 #include <_types.h>
8 #define _PDCLIB_THR_T __darwin_pthread_t
9 #define _PDCLIB_CND_T __darwin_pthread_cond_t
10 #define _PDCLIB_MTX_T __darwin_pthread_mutex_t
11
12 #define _PDCLIB_TSS_DTOR_ITERATIONS 5
13 #define _PDCLIB_TSS_T __darwin_pthread_key_t
14
15 typedef __darwin_pthread_once_t _PDCLIB_once_flag;
16 #define _PDCLIB_ONCE_FLAG_INIT {_PTHREAD_ONCE_SIG_init, {0}}
17
18 #else
19 /* Just include pthread.h */
20 #include <pthread.h>
21 #define _PDCLIB_THR_T pthread_t
22 #define _PDCLIB_CND_T pthread_cond_t
23 #define _PDCLIB_MTX_T pthread_mutex_t
24 #define _PDCLIB_TSS_DTOR_ITERATIONS 5
25 #define _PDCLIB_TSS_T pthread_key_t
26 typedef pthread_once_t _PDCLIB_once_flag;
27 #define _PDCLIB_ONCE_FLAG_INIT PTHREAD_ONCE_INIT
28
29 #endif
30
31 _PDCLIB_END_EXTERN_C
32 #endif