diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-03 10:42:18 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-03 15:17:16 +0200 |
commit | d46b42489a62124a672e7abea1d393f519979828 (patch) | |
tree | abe2ae52595e64723d4940a3753fec6574138f29 /storage/innobase/sync/sync0rw.cc | |
parent | 3872e585f3ed566c91abd131cb7000871107de64 (diff) | |
download | mariadb-git-d46b42489a62124a672e7abea1d393f519979828.tar.gz |
MDEV-24142 preparation: Add srw_mutex and srw_lock::u_lock()
The PERFORMANCE_SCHEMA insists on distinguishing read-update-write
locks from read-write locks, so we must add
template<bool support_u_lock> in rd_lock() and wr_lock() operations.
rd_lock::read_trylock(): Add template<bool prioritize_updater=false>
which is used by the srw_lock_low::read_lock() loop. As long as
an UPDATE lock has already been granted to some thread, we will grant
subsequent READ lock requests even if a waiting WRITE lock request
exists. This will be necessary to be compatible with existing usage
pattern of InnoDB rw_lock_t where the holder of SX-latch (which we
will rename to UPDATE latch) may acquire an additional S-latch
on the same object. For normal read-write locks without update operations
this should make no difference at all, because the rw_lock::UPDATER
flag would never be set.
Diffstat (limited to 'storage/innobase/sync/sync0rw.cc')
0 files changed, 0 insertions, 0 deletions