summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2018-07-20 14:15:28 +0200
committerGitHub <noreply@github.com>2018-07-20 14:15:28 +0200
commitd93895b036a8bd09b02f947324fb1713a9488edd (patch)
treeb2abf7080b268e1d43e52d3e858e8236efd1a3ec
parent67893969909e31df00b319460102ffed503c7d7b (diff)
parent59934147c6454c275ebc6c311215bf391706e680 (diff)
Merge pull request #6442 from vespa-engine/balder/add-reorder-fence
Add a reorder fence.
-rw-r--r--searchlib/src/vespa/searchlib/common/bitvector.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/searchlib/src/vespa/searchlib/common/bitvector.h b/searchlib/src/vespa/searchlib/common/bitvector.h
index 298528d0846..7405688f4f7 100644
--- a/searchlib/src/vespa/searchlib/common/bitvector.h
+++ b/searchlib/src/vespa/searchlib/common/bitvector.h
@@ -121,6 +121,7 @@ public:
void setSize(Index sz) {
setBit(sz); // Need to place the new stop sign first
+ std::atomic_thread_fence(std::memory_order_release);
if (sz > _sz) {
// Can only remove the old stopsign if it is ahead of the new.
clearBit(_sz);