diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-02-11 14:36:11 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-02-11 14:36:11 +0200 |
commit | 903464929ca2cd5a3fd994dad90d7bf78d653def (patch) | |
tree | c2116f9ae519ffc22dc19c714a6459267d4b33c2 /storage/innobase/buf/buf0buf.cc | |
parent | 2e64513fba75bb79be8faaea79790ede4d64e80a (diff) | |
download | mariadb-git-903464929ca2cd5a3fd994dad90d7bf78d653def.tar.gz |
MDEV-20612 preparation: LockMutexGuard
Let us use the RAII wrapper LockMutexGuard for most operations where
lock_sys.mutex is acquired.
Diffstat (limited to 'storage/innobase/buf/buf0buf.cc')
-rw-r--r-- | storage/innobase/buf/buf0buf.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 03b74f105a1..4fcbc61e4f0 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -2038,9 +2038,8 @@ withdraw_retry: {found, withdraw_started, my_hrtime_coarse()}; withdraw_started = current_time; - lock_sys.mutex_lock(); + LockMutexGuard g; trx_sys.trx_list.for_each(f); - lock_sys.mutex_unlock(); } if (should_retry_withdraw) { |