diff options
author | monty@donna.mysql.com <> | 2000-09-21 01:58:38 +0300 |
---|---|---|
committer | monty@donna.mysql.com <> | 2000-09-21 01:58:38 +0300 |
commit | df280335b0c026525a7d7f6164247cda63967067 (patch) | |
tree | e2dd869fb38dfdf7e26817e7b0f7a7a6add22758 /mysys/my_winthread.c | |
parent | 80d200e18b2b8d4e3f5528895f97eee49aede9a5 (diff) | |
download | mariadb-git-df280335b0c026525a7d7f6164247cda63967067.tar.gz |
Fix for SAFE_MUTEX + MERGE tables
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 |