#ifndef CGE_THREAD_INTERNAL_H #define CGE_THREAD_INTERNAL_H #define _POSIX_C_SOURCE 200112L #include "../CgeThread.h" #include #include struct CgeCondition { pthread_cond_t handle; }; struct CgeMutex { pthread_mutex_t handle; }; #if (_POSIX_SEMAPHORES >= 200112L) #include struct CgeSemaphore { sem_t handle; }; #else struct CgeSemaphore { int count; int waiters; pthread_mutex_t mutex; pthread_cond_t condition; }; #endif struct CgeThread { pthread_t handle; }; struct CgeTss { pthread_key_t handle; }; #endif /* CGE_THREAD_INTERNAL_H */