Commit 8ea807c6 authored by unknown's avatar unknown

Merge from mysql-5.1 to mysql-5.5

parents 0122a138 c6d47e6e
......@@ -542,7 +542,7 @@ mutex. */
UNIV_INTERN
void
rw_lock_debug_mutex_enter(void);
/*==========================*/
/*===========================*/
/******************************************************************//**
Releases the debug mutex. */
UNIV_INTERN
......@@ -632,7 +632,8 @@ struct rw_lock_struct {
};
#ifdef UNIV_SYNC_DEBUG
/** The structure for storing debug info of an rw-lock */
/** The structure for storing debug info of an rw-lock. All access to this
structure must be protected by rw_lock_debug_mutex_enter(). */
struct rw_lock_debug_struct {
os_thread_id_t thread_id; /*!< The thread id of the thread which
......
......@@ -715,7 +715,7 @@ mutex. */
UNIV_INTERN
void
rw_lock_debug_mutex_enter(void)
/*==========================*/
/*===========================*/
{
loop:
if (0 == mutex_enter_nowait(&rw_lock_debug_mutex)) {
......@@ -942,11 +942,13 @@ rw_lock_list_print_info(
putc('\n', file);
}
rw_lock_debug_mutex_enter();
info = UT_LIST_GET_FIRST(lock->debug_list);
while (info != NULL) {
rw_lock_debug_print(file, info);
info = UT_LIST_GET_NEXT(list, info);
}
rw_lock_debug_mutex_exit();
}
#ifndef INNODB_RW_LOCKS_USE_ATOMICS
mutex_exit(&(lock->mutex));
......@@ -990,11 +992,13 @@ rw_lock_print(
putc('\n', stderr);
}
rw_lock_debug_mutex_enter();
info = UT_LIST_GET_FIRST(lock->debug_list);
while (info != NULL) {
rw_lock_debug_print(stderr, info);
info = UT_LIST_GET_NEXT(list, info);
}
rw_lock_debug_mutex_exit();
}
}
......
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