1 // This is an incomplete & imprecice implementation of the Posix 2 // standard file by the same name 3 4 5 // Since this is only intended for VC++ compilers 6 // use #pragma once instead of guard macros 7 #pragma once 8 9 #ifdef _MSC_VER // Only for cross compilation to windows 10 11 // #include <sched.h> 12 #include <sys/types.h> 13 14 #define PTHREAD_DESTRUCTOR_ITERATIONS 0 15 #define PTHREAD_MUTEX_INITIALIZER 0 16 #define PTHREAD_ONCE_INIT 0 17 18 typedef long pthread_key_t; 19 typedef long pthread_mutex_t; 20 typedef long pthread_mutexattr_t; 21 typedef long pthread_once_t; 22 23 int pthread_key_create(pthread_key_t *, void (*)(void*)); 24 int pthread_mutex_init(pthread_mutex_t *, const pthread_mutexattr_t *); 25 int pthread_mutex_lock(pthread_mutex_t *); 26 int pthread_mutex_unlock(pthread_mutex_t *); 27 int pthread_once(pthread_once_t *, void (*)(void)); 28 int pthread_setspecific(pthread_key_t, const void *); 29 30 #endif // _MSC_VER 31