diff options
Diffstat (limited to 'storage/innobase/sync/sync0rw.c')
-rw-r--r-- | storage/innobase/sync/sync0rw.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/storage/innobase/sync/sync0rw.c b/storage/innobase/sync/sync0rw.c index d231b6acdf7..c05c823ff61 100644 --- a/storage/innobase/sync/sync0rw.c +++ b/storage/innobase/sync/sync0rw.c @@ -168,12 +168,22 @@ UNIV_INTERN ib_int64_t rw_x_exit_count = 0; UNIV_INTERN rw_lock_list_t rw_lock_list; UNIV_INTERN mutex_t rw_lock_list_mutex; +#ifdef UNIV_PFS_MUTEX +UNIV_INTERN mysql_pfs_key_t rw_lock_list_mutex_key; +UNIV_INTERN mysql_pfs_key_t rw_lock_mutex_key; +#endif /* UNIV_PFS_MUTEX */ + #ifdef UNIV_SYNC_DEBUG /* The global mutex which protects debug info lists of all rw-locks. To modify the debug info list of an rw-lock, this mutex has to be acquired in addition to the mutex protecting the lock. */ UNIV_INTERN mutex_t rw_lock_debug_mutex; + +# ifdef UNIV_PFS_MUTEX +UNIV_INTERN mysql_pfs_key_t rw_lock_debug_mutex_key; +# endif + /* If deadlock detection does not get immediately the mutex, it may wait for this event */ UNIV_INTERN os_event_t rw_lock_debug_event; @@ -231,7 +241,7 @@ rw_lock_create_func( # ifdef UNIV_SYNC_DEBUG ulint level, /*!< in: level */ # endif /* UNIV_SYNC_DEBUG */ - const char* cmutex_name, /*!< in: mutex name */ + 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 */ @@ -240,7 +250,8 @@ rw_lock_create_func( created, then the following call initializes the sync system. */ #ifndef INNODB_RW_LOCKS_USE_ATOMICS - mutex_create(rw_lock_get_mutex(lock), SYNC_NO_ORDER_CHECK); + mutex_create(rw_lock_mutex_key, rw_lock_get_mutex(lock), + SYNC_NO_ORDER_CHECK); lock->mutex.cfile_name = cfile_name; lock->mutex.cline = cline; @@ -298,8 +309,8 @@ the rw-lock is freed. Removes an rw-lock object from the global list. The rw-lock is checked to be in the non-locked state. */ UNIV_INTERN void -rw_lock_free( -/*=========*/ +rw_lock_free_func( +/*==============*/ rw_lock_t* lock) /*!< in: rw-lock */ { ut_ad(rw_lock_validate(lock)); @@ -607,7 +618,7 @@ rw_lock_x_lock_func( { ulint index; /*!< index of the reserved wait cell */ ulint i; /*!< spin round count */ - ibool spinning = FALSE; + ibool spinning = FALSE; ut_ad(rw_lock_validate(lock)); |