Commit 5eeb7509 authored by Philip Pronin's avatar Philip Pronin Committed by Tudor Bosman

fix memory order in AtomicHashMap<>::findInternal()

Summary:
Looks like a typo, it should obviously be std::memory_order_relaxed (all
necessary synchronization is done on numMapsAllocated_).

Test Plan: compiled it, ran tests

Reviewed By: sahrens@fb.com

FB internal diff: D515322
parent dcf79b80
......@@ -163,7 +163,7 @@ findInternal(const KeyT k) const {
int const numMaps = numMapsAllocated_.load(std::memory_order_acquire);
FOR_EACH_RANGE(i, 1, numMaps) {
// Check each map successively. If one succeeds, we're done!
SubMap* thisMap = subMaps_[i].load(std::memory_order_release);
SubMap* thisMap = subMaps_[i].load(std::memory_order_relaxed);
ret = thisMap->findInternal(k);
if (LIKELY(ret.idx != thisMap->capacity_)) {
return SimpleRetT(i, ret.idx, ret.success);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment