summaryrefslogtreecommitdiff
path: root/innobase/os/os0thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/os/os0thread.c')
-rw-r--r--innobase/os/os0thread.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/innobase/os/os0thread.c b/innobase/os/os0thread.c
index 75f19f6d175..9eb80cdf826 100644
--- a/innobase/os/os0thread.c
+++ b/innobase/os/os0thread.c
@@ -96,17 +96,20 @@ os_thread_create(
void* arg, /* in: argument to start
function */
os_thread_id_t* thread_id) /* out: id of created
- thread */
+ thread; currently this is
+ identical to the handle to
+ the thread */
{
#ifdef __WIN__
os_thread_t thread;
+ ulint win_thread_id;
thread = CreateThread(NULL, /* no security attributes */
0, /* default size stack */
(LPTHREAD_START_ROUTINE)start_f,
arg,
0, /* thread runs immediately */
- thread_id);
+ &win_thread_id);
if (srv_set_thread_priorities) {
@@ -117,6 +120,8 @@ os_thread_create(
ut_a(SetThreadPriority(thread, srv_query_thread_priority));
}
+ *thread_id = thread;
+
return(thread);
#else
int ret;
@@ -134,6 +139,8 @@ os_thread_create(
my_pthread_setprio(pthread, srv_query_thread_priority);
}
+ *thread_id = pthread;
+
return(pthread);
#endif
}