Skip to content

Commit e14790b

Browse files
committed
let buf_page_hash_lock_get() be function, not macro
1 parent 365f478 commit e14790b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

storage/innobase/include/buf0buf.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2351,8 +2351,11 @@ Use these instead of accessing buf_pool->mutex directly. */
23512351

23522352

23532353
/** Get appropriate page_hash_lock. */
2354-
# define buf_page_hash_lock_get(buf_pool, page_id) \
2355-
hash_get_lock((buf_pool)->page_hash, (page_id).fold())
2354+
inline rw_lock_t*
2355+
buf_page_hash_lock_get(const buf_pool_t* buf_pool, page_id_t page_id)
2356+
{
2357+
return hash_get_lock(buf_pool->page_hash, page_id.fold());
2358+
}
23562359

23572360
/** If not appropriate page_hash_lock, relock until appropriate. */
23582361
# define buf_page_hash_lock_s_confirm(hash_lock, buf_pool, page_id)\

0 commit comments

Comments
 (0)