summaryrefslogtreecommitdiff
path: root/innobase/include/sync0rw.h
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/include/sync0rw.h')
-rw-r--r--innobase/include/sync0rw.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/innobase/include/sync0rw.h b/innobase/include/sync0rw.h
index 741f9500612..4cd26ba1921 100644
--- a/innobase/include/sync0rw.h
+++ b/innobase/include/sync0rw.h
@@ -61,8 +61,12 @@ Creates, or rather, initializes an rw-lock object in a specified memory
location (which must be appropriately aligned). The rw-lock is initialized
to the non-locked state. Explicit freeing of the rw-lock with rw_lock_free
is necessary only if the memory block containing it is freed. */
-#define rw_lock_create(L) rw_lock_create_func((L), __FILE__, __LINE__, #L)
-
+#ifdef UNIV_DEBUG
+# define rw_lock_create(L) rw_lock_create_func((L), #L, __FILE__, __LINE__)
+#else /* UNIV_DEBUG */
+# define rw_lock_create(L) rw_lock_create_func((L), __FILE__, __LINE__)
+#endif /* UNIV_DEBUG */
+
/*=====================*/
/**********************************************************************
Creates, or rather, initializes an rw-lock object in a specified memory
@@ -74,9 +78,11 @@ void
rw_lock_create_func(
/*================*/
rw_lock_t* lock, /* in: pointer to memory */
+#ifdef UNIV_DEBUG
+ const char* cmutex_name, /* in: mutex name */
+#endif /* UNIV_DEBUG */
const char* cfile_name, /* in: file name where created */
- ulint cline, /* in: file line where created */
- const char* cmutex_name); /* in: mutex name */
+ ulint cline); /* in: file line where created */
/**********************************************************************
Calling this function is obligatory only if the memory buffer containing
the rw-lock is freed. Removes an rw-lock object from the global list. The