You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!freeListHead.compare_exchange_strong(head, node, std::memory_order_release, std::memory_order_relaxed)) {
1531
1531
// Hmm, the add failed, but we can only try again when the refcount goes back to zero
1532
-
if (node->freeListRefs.fetch_add(SHOULD_BE_ON_FREELIST - 1, std::memory_order_release) == 1) {
1532
+
if (node->freeListRefs.fetch_add(SHOULD_BE_ON_FREELIST - 1, std::memory_order_acq_rel) == 1) {
1533
1533
continue;
1534
1534
}
1535
1535
}
@@ -1604,7 +1604,7 @@ class ConcurrentQueue
1604
1604
}
1605
1605
else {
1606
1606
// Increment counter
1607
-
auto prevVal = elementsCompletelyDequeued.fetch_add(1, std::memory_order_release);
1607
+
auto prevVal = elementsCompletelyDequeued.fetch_add(1, std::memory_order_acq_rel);
1608
1608
assert(prevVal < BLOCK_SIZE);
1609
1609
return prevVal == BLOCK_SIZE - 1;
1610
1610
}
@@ -1627,7 +1627,7 @@ class ConcurrentQueue
1627
1627
}
1628
1628
else {
1629
1629
// Increment counter
1630
-
auto prevVal = elementsCompletelyDequeued.fetch_add(count, std::memory_order_release);
1630
+
auto prevVal = elementsCompletelyDequeued.fetch_add(count, std::memory_order_acq_rel);
1631
1631
assert(prevVal + count <= BLOCK_SIZE);
1632
1632
return prevVal + count == BLOCK_SIZE;
1633
1633
}
@@ -2044,7 +2044,7 @@ class ConcurrentQueue
2044
2044
}
2045
2045
else {
2046
2046
// Wasn't anything to dequeue after all; make the effective dequeue count eventually consistent
2047
-
this->dequeueOvercommit.fetch_add(1, std::memory_order_release); // Release so that the fetch_add on dequeueOptimisticCount is guaranteed to happen before this write
2047
+
this->dequeueOvercommit.fetch_add(1, std::memory_order_acq_rel); // Release so that the fetch_add on dequeueOptimisticCount is guaranteed to happen before this write
2048
2048
}
2049
2049
}
2050
2050
@@ -2261,7 +2261,7 @@ class ConcurrentQueue
2261
2261
if (details::circular_less_than<size_t>(0, actualCount)) {
0 commit comments