diff --git a/speech2/src/winxp_compat_threadsafe_static.c b/speech2/src/winxp_compat_threadsafe_static.c index 3fe546e..4f452ed 100644 --- a/speech2/src/winxp_compat_threadsafe_static.c +++ b/speech2/src/winxp_compat_threadsafe_static.c @@ -10,7 +10,7 @@ #include #include -//#include +#include static const int UNINITIALIZED = 0; static const int INITIALIZING = -1; @@ -23,27 +23,27 @@ static const int EPOCH_BASE = INT_MIN; int _Init_global_epoch = EPOCH_BASE; __declspec(thread) int _Init_thread_epoch = EPOCH_BASE; -//static pthread_mutex_t _Init_thread_mutex = PTHREAD_MUTEX_INITIALIZER; -//static pthread_cond_t _Init_thread_cond = PTHREAD_COND_INITIALIZER; +static pthread_mutex_t _Init_thread_mutex = PTHREAD_MUTEX_INITIALIZER; +static pthread_cond_t _Init_thread_cond = PTHREAD_COND_INITIALIZER; void __cdecl _Init_thread_lock() { - // pthread_mutex_lock(&_Init_thread_mutex); + pthread_mutex_lock(&_Init_thread_mutex); } void __cdecl _Init_thread_unlock() { - //pthread_mutex_unlock(&_Init_thread_mutex); + pthread_mutex_unlock(&_Init_thread_mutex); } void __cdecl _Init_thread_wait_v2() { - //pthread_cond_wait(&_Init_thread_cond, &_Init_thread_mutex); + pthread_cond_wait(&_Init_thread_cond, &_Init_thread_mutex); } void __cdecl _Init_thread_notify() { - // pthread_cond_broadcast(&_Init_thread_cond); + pthread_cond_broadcast(&_Init_thread_cond); } void __cdecl _Init_thread_header(int* const pOnce)