Skip to content

Commit 5ac6ffc

Browse files
committed
Relax memory order for array_head (atomicity only).
1 parent 900d1d6 commit 5ac6ffc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/bitcoin/database/impl/primitives/arrayhead.ipp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Link CLASS::at(size_t key) const NOEXCEPT
137137
// xcode clang++16 does not support C++20 std::atomic_ref.
138138
////const std::atomic_ref<integer> head(unsafe_byte_cast<integer>(raw));
139139
const auto& head = *pointer_cast<std::atomic<integer>>(raw);
140-
return head.load(std::memory_order_acquire);
140+
return head.load(std::memory_order_relaxed);
141141
}
142142
else
143143
{
@@ -167,7 +167,7 @@ bool CLASS::push(const Link& link, const Link& index) NOEXCEPT
167167
// xcode clang++16 does not support C++20 std::atomic_ref.
168168
////const std::atomic_ref<integer> head(unsafe_byte_cast<integer>(raw));
169169
auto& head = *pointer_cast<std::atomic<integer>>(raw);
170-
head.store(link, std::memory_order_release);
170+
head.store(link, std::memory_order_relaxed);
171171
}
172172
else
173173
{

0 commit comments

Comments
 (0)