summaryrefslogtreecommitdiff
path: root/mysys/my_winthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/my_winthread.c')
-rw-r--r--mysys/my_winthread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mysys/my_winthread.c b/mysys/my_winthread.c
index 7a1e1365325..e410121af98 100644
--- a/mysys/my_winthread.c
+++ b/mysys/my_winthread.c
@@ -48,13 +48,13 @@ static pthread_handler_decl(pthread_start,param)
{
pthread_handler func=((struct pthread_map *) param)->func;
void *func_param=((struct pthread_map *) param)->param;
- my_thread_init();
- pthread_mutex_lock(&THR_LOCK_thread); /* Wait for beingthread to return */
+ my_thread_init(); /* Will always succeed in windows */
+ pthread_mutex_lock(&THR_LOCK_thread); /* Wait for beginthread to return */
win_pthread_self=((struct pthread_map *) param)->pthreadself;
pthread_mutex_unlock(&THR_LOCK_thread);
- free((char*) param);
+ free((char*) param); /* Free param from create */
pthread_exit((*func)(func_param));
- return 0;
+ return 0; /* Safety */
}