summaryrefslogtreecommitdiff
path: root/mysys/my_winthread.c
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-09-21 01:58:38 +0300
committerunknown <monty@donna.mysql.com>2000-09-21 01:58:38 +0300
commit43044b685f765718f5f90ac26fa3e2317b5749e9 (patch)
treee2dd869fb38dfdf7e26817e7b0f7a7a6add22758 /mysys/my_winthread.c
parent73826420c3114dad809c2c051ba60a6e3f50ee20 (diff)
downloadmariadb-git-43044b685f765718f5f90ac26fa3e2317b5749e9.tar.gz
Fix for SAFE_MUTEX + MERGE tables
Docs/manual.texi: Fix for release include/my_pthread.h: Fix for SAFE_MUTEX for windows include/myisammrg.h: Fix for empty MERGE tables myisam/ft_stopwords.c: Free used memory myisammrg/myrg_open.c: Fix for empty MERGE tables myisammrg/myrg_queue.c: Fix for empty MERGE tables myisammrg/myrg_rfirst.c: cleanup myisammrg/myrg_rkey.c: cleanup mysys/my_thr_init.c: Fix SAFE_MUTEX for windows mysys/my_winthread.c: Fix SAFE_MUTEX for windows mysys/thr_mutex.c: Fix SAFE_MUTEX for windows sql/ha_myisammrg.cc: Fix for empty MERGE tables sql/mysqld.cc: Fix type
Diffstat (limited to 'mysys/my_winthread.c')
-rw-r--r--mysys/my_winthread.c10
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