Commit 2ceffc0d authored by osku's avatar osku

Make 'thread_id' parameter in os_thread_create() optional.

parent bb86948f
...@@ -77,7 +77,7 @@ os_thread_create( ...@@ -77,7 +77,7 @@ os_thread_create(
void* arg, /* in: argument to start void* arg, /* in: argument to start
function */ function */
os_thread_id_t* thread_id); /* out: id of the created os_thread_id_t* thread_id); /* out: id of the created
thread */ thread, or NULL */
int int
os_thread_join( os_thread_join(
/*===========*/ /*===========*/
......
...@@ -2940,7 +2940,6 @@ recv_recovery_from_checkpoint_finish(void) ...@@ -2940,7 +2940,6 @@ recv_recovery_from_checkpoint_finish(void)
/*======================================*/ /*======================================*/
{ {
int i; int i;
os_thread_id_t recovery_thread_id;
/* Apply the hashed log records to the respective file pages */ /* Apply the hashed log records to the respective file pages */
...@@ -2984,7 +2983,7 @@ recv_recovery_from_checkpoint_finish(void) ...@@ -2984,7 +2983,7 @@ recv_recovery_from_checkpoint_finish(void)
session */ session */
os_thread_create(trx_rollback_or_clean_all_without_sess, os_thread_create(trx_rollback_or_clean_all_without_sess,
(void *)&i, &recovery_thread_id); (void *)&i, NULL);
} }
} }
......
...@@ -96,7 +96,7 @@ os_thread_create( ...@@ -96,7 +96,7 @@ os_thread_create(
void* arg, /* in: argument to start void* arg, /* in: argument to start
function */ function */
os_thread_id_t* thread_id) /* out: id of the created os_thread_id_t* thread_id) /* out: id of the created
thread */ thread, or NULL */
{ {
#ifdef __WIN__ #ifdef __WIN__
os_thread_t thread; os_thread_t thread;
...@@ -122,7 +122,9 @@ os_thread_create( ...@@ -122,7 +122,9 @@ os_thread_create(
ut_a(SetThreadPriority(thread, srv_query_thread_priority)); ut_a(SetThreadPriority(thread, srv_query_thread_priority));
} }
*thread_id = win_thread_id; if (thread_id) {
*thread_id = win_thread_id;
}
return(thread); return(thread);
#else #else
...@@ -180,7 +182,9 @@ os_thread_create( ...@@ -180,7 +182,9 @@ os_thread_create(
my_pthread_setprio(pthread, srv_query_thread_priority); my_pthread_setprio(pthread, srv_query_thread_priority);
} }
*thread_id = pthread; if (thread_id) {
*thread_id = pthread;
}
return(pthread); return(pthread);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment