summaryrefslogtreecommitdiff
path: root/innobase/include/sync0sync.ic
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/include/sync0sync.ic')
-rw-r--r--innobase/include/sync0sync.ic13
1 files changed, 5 insertions, 8 deletions
diff --git a/innobase/include/sync0sync.ic b/innobase/include/sync0sync.ic
index c11cc0d196e..758c8524f66 100644
--- a/innobase/include/sync0sync.ic
+++ b/innobase/include/sync0sync.ic
@@ -25,6 +25,7 @@ mutex_spin_wait(
mutex_t* mutex, /* in: pointer to mutex */
char* file_name,/* in: file name where mutex requested */
ulint line); /* in: line where requested */
+#ifdef UNIV_SYNC_DEBUG
/**********************************************************************
Sets the debug information for a reserved mutex. */
@@ -34,6 +35,7 @@ mutex_set_debug_info(
mutex_t* mutex, /* in: mutex */
char* file_name, /* in: file where requested */
ulint line); /* in: line where requested */
+#endif /* UNIV_SYNC_DEBUG */
/**********************************************************************
Releases the threads waiting in the primary wait array for this mutex. */
@@ -200,9 +202,9 @@ mutex_exit(
/*=======*/
mutex_t* mutex) /* in: pointer to mutex */
{
+#ifdef UNIV_SYNC_DEBUG
ut_ad(mutex_own(mutex));
-#ifdef UNIV_SYNC_DEBUG
mutex->thread_id = ULINT_UNDEFINED;
sync_thread_reset_level(mutex);
@@ -249,14 +251,9 @@ mutex_enter_func(
the atomic test_and_set; we could peek, and possibly save time. */
if (!mutex_test_and_set(mutex)) {
-
- #ifdef UNIV_SYNC_DEBUG
+#ifdef UNIV_SYNC_DEBUG
mutex_set_debug_info(mutex, file_name, line);
- #endif
-
- mutex->file_name = file_name;
- mutex->line = line;
-
+#endif
return; /* Succeeded! */
}