diff options
Diffstat (limited to 'mysys/my_winthread.c')
-rw-r--r-- | mysys/my_winthread.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mysys/my_winthread.c b/mysys/my_winthread.c index e410121af98..6a99fa0bb02 100644 --- a/mysys/my_winthread.c +++ b/mysys/my_winthread.c @@ -19,13 +19,16 @@ ** Simulation of posix threads calls for WIN95 and NT *****************************************************************************/ +/* SAFE_MUTEX will not work until the thread structure is up to date */ +#undef SAFE_MUTEX + #include "mysys_priv.h" #if defined(THREAD) && defined(__WIN__) #include <m_string.h> #undef getpid #include <process.h> -extern pthread_mutex_t THR_LOCK_thread; +static pthread_mutex_t THR_LOCK_thread; struct pthread_map { @@ -34,6 +37,11 @@ struct pthread_map void *param; }; +void win_pthread_init(void) +{ + pthread_mutex_init(&THR_LOCK_thread,NULL); +} + /* ** We have tried to use '_beginthreadex' instead of '_beginthread' here ** but in this case the program leaks about 512 characters for each |