diff options
Diffstat (limited to 'innobase/include/buf0buf.ic')
-rw-r--r-- | innobase/include/buf0buf.ic | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/innobase/include/buf0buf.ic b/innobase/include/buf0buf.ic index d8e5857a570..0957dcf4402 100644 --- a/innobase/include/buf0buf.ic +++ b/innobase/include/buf0buf.ic @@ -129,7 +129,9 @@ buf_pool_clock_tic(void) /*====================*/ /* out: new clock value */ { +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); +#endif /* UNIV_SYNC_DEBUG */ buf_pool->ulint_clock++; @@ -471,8 +473,10 @@ buf_frame_modify_clock_inc( block = buf_block_align_low(frame); +#ifdef UNIV_SYNC_DEBUG ut_ad((mutex_own(&(buf_pool->mutex)) && (block->buf_fix_count == 0)) || rw_lock_own(&(block->lock), RW_LOCK_EXCLUSIVE)); +#endif /* UNIV_SYNC_DEBUG */ UT_DULINT_INC(block->modify_clock); @@ -495,8 +499,10 @@ buf_frame_get_modify_clock( block = buf_block_align(frame); +#ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&(block->lock), RW_LOCK_SHARED) || rw_lock_own(&(block->lock), RW_LOCK_EXCLUSIVE)); +#endif /* UNIV_SYNC_DEBUG */ return(block->modify_clock); } @@ -546,7 +552,9 @@ buf_page_hash_get( ulint fold; ut_ad(buf_pool); +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); +#endif /* UNIV_SYNC_DEBUG */ /* Look for the page in the hash table */ @@ -644,6 +652,7 @@ buf_page_release( } } +#ifdef UNIV_SYNC_DEBUG /************************************************************************* Adds latch level info for the rw-lock protecting the buffer frame. This should be called in the debug version after a successful latching of a @@ -658,7 +667,6 @@ buf_page_dbg_add_level( ulint level __attribute__((unused))) /* in: latching order level */ { -#ifdef UNIV_SYNC_DEBUG sync_thread_add_level(&(buf_block_align(frame)->lock), level); -#endif } +#endif /* UNIV_SYNC_DEBUG */ |