[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_() {
|
||||
recursing_lock lock(*this);
|
||||
|
||||
for (auto const &p : ops_) {
|
||||
block_address b = p.first;
|
||||
auto const &op = p.second;
|
||||
while (!ops_.empty()) {
|
||||
auto p = ops_.begin();
|
||||
block_address b = p->first;
|
||||
auto op = p->second;
|
||||
ops_.erase(p);
|
||||
|
||||
switch (op.op_) {
|
||||
case INC:
|
||||
@ -230,7 +232,6 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
ops_.clear();
|
||||
allocated_blocks_.clear();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user