diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-11-18 17:34:19 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-11-18 17:34:19 +0200 |
commit | 862eccd5244219b59ffcfa86bb203478d45d30a8 (patch) | |
tree | 2fc05a3731c15de6f8bada4b9957e99e99c5aee7 | |
parent | 0a168398a0a1f80ae9becab10c777cfe4631ea70 (diff) | |
download | mariadb-git-862eccd5244219b59ffcfa86bb203478d45d30a8.tar.gz |
MDEV-26769 fixup: Fix the SUX_LOCK_GENERIC build
-rw-r--r-- | storage/innobase/include/buf0types.h | 2 | ||||
-rw-r--r-- | storage/innobase/include/srw_lock.h | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/storage/innobase/include/buf0types.h b/storage/innobase/include/buf0types.h index 2cb92a5f1df..d3ee0b42169 100644 --- a/storage/innobase/include/buf0types.h +++ b/storage/innobase/include/buf0types.h @@ -191,10 +191,8 @@ public: /** Acquire an exclusive lock */ inline void lock(); -#ifdef UNIV_DEBUG /** @return whether an exclusive lock is being held by any thread */ bool is_write_locked() const { return rw_lock::is_write_locked(); } -#endif /** @return whether any lock is being held by any thread */ bool is_locked() const { return rw_lock::is_locked(); } diff --git a/storage/innobase/include/srw_lock.h b/storage/innobase/include/srw_lock.h index 54d042419ca..23d8e35aa7b 100644 --- a/storage/innobase/include/srw_lock.h +++ b/storage/innobase/include/srw_lock.h @@ -137,6 +137,7 @@ public: void destroy(); /** @return whether any writer is waiting */ bool is_waiting() const { return (value() & WRITER_WAITING) != 0; } + bool is_write_locked() const { return rw_lock::is_write_locked(); } bool rd_lock_try() { uint32_t l; return read_trylock(l); } bool wr_lock_try() { return write_trylock(); } |