diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2014-08-07 19:12:45 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2014-08-07 19:12:45 +0200 |
commit | f835588cc2e32da97269cc58e97ee77b5927498a (patch) | |
tree | 8e5c53593e7e3a9db0892afefb118fd0d581e23a /storage/innobase/sync/sync0rw.cc | |
parent | 0219ac1e98cc53250a8e165c4b37e83529932256 (diff) | |
parent | b81b6d3f836feb682b963c9489f00ca1ee6a6a95 (diff) | |
download | mariadb-git-f835588cc2e32da97269cc58e97ee77b5927498a.tar.gz |
- Commiting merge files
Diffstat (limited to 'storage/innobase/sync/sync0rw.cc')
-rw-r--r-- | storage/innobase/sync/sync0rw.cc | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/storage/innobase/sync/sync0rw.cc b/storage/innobase/sync/sync0rw.cc index ebf73917702..e129d39fc9d 100644 --- a/storage/innobase/sync/sync0rw.cc +++ b/storage/innobase/sync/sync0rw.cc @@ -151,18 +151,12 @@ UNIV_INTERN mysql_pfs_key_t rw_lock_mutex_key; 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 ib_mutex_t rw_lock_debug_mutex; +UNIV_INTERN os_fast_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; -/* This is set to TRUE, if there may be waiters for the event */ -UNIV_INTERN ibool rw_lock_debug_waiters; - /******************************************************************//** Creates a debug info struct. */ static @@ -690,22 +684,7 @@ void rw_lock_debug_mutex_enter(void) /*===========================*/ { -loop: - if (0 == mutex_enter_nowait(&rw_lock_debug_mutex)) { - return; - } - - os_event_reset(rw_lock_debug_event); - - rw_lock_debug_waiters = TRUE; - - if (0 == mutex_enter_nowait(&rw_lock_debug_mutex)) { - return; - } - - os_event_wait(rw_lock_debug_event); - - goto loop; + os_fast_mutex_lock(&rw_lock_debug_mutex); } /******************************************************************//** @@ -715,12 +694,7 @@ void rw_lock_debug_mutex_exit(void) /*==========================*/ { - mutex_exit(&rw_lock_debug_mutex); - - if (rw_lock_debug_waiters) { - rw_lock_debug_waiters = FALSE; - os_event_set(rw_lock_debug_event); - } + os_fast_mutex_unlock(&rw_lock_debug_mutex); } /******************************************************************//** |