mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
MDEV-22456 after-merge fix: Avoid functional change to rw_lock_s_unlock()
In the merge 9e6e43551f
we replaced
direct use of std::atomic with a wrapper class, so that
dict_index_t::lock will support the default assignment operator.
As part of that change, one occurrence of std::memory_order_release
was accidentally replaced with std::memory_order_relaxed.
Thanks to Sergey Vojtovich for noticing this.
This commit is contained in:
parent
57f7b4866f
commit
2fbf751407
1 changed files with 2 additions and 1 deletions
|
@ -355,7 +355,8 @@ rw_lock_s_unlock_func(
|
|||
ut_d(rw_lock_remove_debug_info(lock, pass, RW_LOCK_S));
|
||||
|
||||
/* Increment lock_word to indicate 1 less reader */
|
||||
int32_t lock_word = lock->lock_word.fetch_add(1);
|
||||
int32_t lock_word = lock->lock_word.fetch_add(
|
||||
1, std::memory_order_release);
|
||||
|
||||
if (lock_word == -1 || lock_word == -X_LOCK_HALF_DECR - 1) {
|
||||
/* wait_ex waiter exists. It may not be asleep, but we signal
|
||||
|
|
Loading…
Add table
Reference in a new issue