mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 17:54:16 +01:00
MDEV-24167 fixup: srw_lock_debug for SUX_LOCK_GENERIC
srw_lock_debug::have_rd(), srw_lock_debug::have_wr(): For SUX_LOCK_GENERIC (no futex based synchronization primitives), we cannot check if the underlying srw_lock is held by us. Thanks to Dmitry Shulga for pointing out this build failure.
This commit is contained in:
parent
903ae30069
commit
042c3fc432
1 changed files with 4 additions and 0 deletions
|
@ -646,7 +646,9 @@ bool srw_lock_debug::have_rd() const noexcept
|
|||
readers_lock.wr_lock();
|
||||
bool found= r->find(pthread_self()) != r->end();
|
||||
readers_lock.wr_unlock();
|
||||
# ifndef SUX_LOCK_GENERIC
|
||||
ut_ad(!found || is_locked());
|
||||
# endif
|
||||
return found;
|
||||
}
|
||||
return false;
|
||||
|
@ -656,7 +658,9 @@ bool srw_lock_debug::have_wr() const noexcept
|
|||
{
|
||||
if (writer != pthread_self())
|
||||
return false;
|
||||
# ifndef SUX_LOCK_GENERIC
|
||||
ut_ad(is_write_locked());
|
||||
# endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue