5 #ifndef _ECPG_PTHREAD_WIN32_H
6 #define _ECPG_PTHREAD_WIN32_H
23 #define PTHREAD_MUTEX_INITIALIZER { 0 }
24 #define PTHREAD_ONCE_INIT false
32 #define pthread_getspecific(key) \
35 #define pthread_setspecific(key, value) \
36 TlsSetValue((key), (value))
39 #define pthread_key_create(key, destructor) \
40 do { *(key) = TlsAlloc(); ((void)(destructor)); } while(0)
42 #define pthread_once(once, fn) \
45 win32_pthread_once((once), (fn)); \
int pthread_mutex_unlock(pthread_mutex_t *mp)
int pthread_mutex_lock(pthread_mutex_t *mp)
int pthread_mutex_init(pthread_mutex_t *mp, void *attr)
struct pthread_mutex_t pthread_mutex_t
CRITICAL_SECTION csection
static void * fn(void *arg)