Commit ca75e779 authored by marko's avatar marko

branches/zip: innobase_mysql_end_print_arbitrary_thd(): Note that

kernel_mutex must be released before calling this function.

innobase_mysql_end_print_arbitrary_thd(),
innobase_mysql_prepare_print_arbitrary_thd(): Assert that the
kernel_mutex is not being held by the current thread.
parent 74ab4b66
...@@ -709,17 +709,21 @@ void ...@@ -709,17 +709,21 @@ void
innobase_mysql_prepare_print_arbitrary_thd(void) innobase_mysql_prepare_print_arbitrary_thd(void)
/*============================================*/ /*============================================*/
{ {
ut_ad(!mutex_own(&kernel_mutex));
VOID(pthread_mutex_lock(&LOCK_thread_count)); VOID(pthread_mutex_lock(&LOCK_thread_count));
} }
/***************************************************************** /*****************************************************************
Releases the mutex reserved by innobase_mysql_prepare_print_arbitrary_thd(). Releases the mutex reserved by innobase_mysql_prepare_print_arbitrary_thd().
*/ In the InnoDB latching order, the mutex sits right above the
kernel_mutex. In debug builds, we assert that the kernel_mutex is
released before this function is invoked. */
extern "C" extern "C"
void void
innobase_mysql_end_print_arbitrary_thd(void) innobase_mysql_end_print_arbitrary_thd(void)
/*========================================*/ /*========================================*/
{ {
ut_ad(!mutex_own(&kernel_mutex));
VOID(pthread_mutex_unlock(&LOCK_thread_count)); VOID(pthread_mutex_unlock(&LOCK_thread_count));
} }
......
...@@ -109,7 +109,9 @@ innobase_mysql_prepare_print_arbitrary_thd(void); ...@@ -109,7 +109,9 @@ innobase_mysql_prepare_print_arbitrary_thd(void);
/***************************************************************** /*****************************************************************
Releases the mutex reserved by innobase_mysql_prepare_print_arbitrary_thd(). Releases the mutex reserved by innobase_mysql_prepare_print_arbitrary_thd().
*/ In the InnoDB latching order, the mutex sits right above the
kernel_mutex. In debug builds, we assert that the kernel_mutex is
released before this function is invoked. */
void void
innobase_mysql_end_print_arbitrary_thd(void); innobase_mysql_end_print_arbitrary_thd(void);
......
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