don't stub threadsafe statics
we are using winpthreads now anyways, so we can unstub the existing code.
This commit is contained in:
parent
ddd3483620
commit
183e11dc0d
1 changed files with 7 additions and 7 deletions
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
//#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
static const int UNINITIALIZED = 0;
|
static const int UNINITIALIZED = 0;
|
||||||
static const int INITIALIZING = -1;
|
static const int INITIALIZING = -1;
|
||||||
|
@ -23,27 +23,27 @@ static const int EPOCH_BASE = INT_MIN;
|
||||||
int _Init_global_epoch = EPOCH_BASE;
|
int _Init_global_epoch = EPOCH_BASE;
|
||||||
__declspec(thread) int _Init_thread_epoch = EPOCH_BASE;
|
__declspec(thread) int _Init_thread_epoch = EPOCH_BASE;
|
||||||
|
|
||||||
//static pthread_mutex_t _Init_thread_mutex = PTHREAD_MUTEX_INITIALIZER;
|
static pthread_mutex_t _Init_thread_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
//static pthread_cond_t _Init_thread_cond = PTHREAD_COND_INITIALIZER;
|
static pthread_cond_t _Init_thread_cond = PTHREAD_COND_INITIALIZER;
|
||||||
|
|
||||||
void __cdecl _Init_thread_lock()
|
void __cdecl _Init_thread_lock()
|
||||||
{
|
{
|
||||||
// pthread_mutex_lock(&_Init_thread_mutex);
|
pthread_mutex_lock(&_Init_thread_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __cdecl _Init_thread_unlock()
|
void __cdecl _Init_thread_unlock()
|
||||||
{
|
{
|
||||||
//pthread_mutex_unlock(&_Init_thread_mutex);
|
pthread_mutex_unlock(&_Init_thread_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __cdecl _Init_thread_wait_v2()
|
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()
|
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)
|
void __cdecl _Init_thread_header(int* const pOnce)
|
||||||
|
|
Loading…
Reference in a new issue