[sm_recursive] Fix atomicity when applying BOPs
Any BOP should be taken only once. Therefore, we should remove BOPs that are being processed or had been processed from the uncommitted list.
This commit is contained in:
parent
4cdffafe88
commit
86139cf6bd
@ -212,9 +212,11 @@ namespace {
|
|||||||
void flush_ops_() {
|
void flush_ops_() {
|
||||||
recursing_lock lock(*this);
|
recursing_lock lock(*this);
|
||||||
|
|
||||||
for (auto const &p : ops_) {
|
while (!ops_.empty()) {
|
||||||
block_address b = p.first;
|
auto p = ops_.begin();
|
||||||
auto const &op = p.second;
|
block_address b = p->first;
|
||||||
|
auto op = p->second;
|
||||||
|
ops_.erase(p);
|
||||||
|
|
||||||
switch (op.op_) {
|
switch (op.op_) {
|
||||||
case INC:
|
case INC:
|
||||||
@ -230,7 +232,6 @@ namespace {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ops_.clear();
|
|
||||||
allocated_blocks_.clear();
|
allocated_blocks_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user