if (curr->is_rmwc() || curr->is_rmw()) {
newcurr = process_rmw(curr);
delete curr;
- compute_promises(newcurr);
+
+ if (newcurr->is_rmw())
+ compute_promises(newcurr);
return newcurr;
}
delete curr;
/* If we have diverged, we need to reset the clock vector. */
- if (diverge == NULL)
+ if (diverge == NULL) {
newcurr->create_cv(get_parent_action(newcurr->get_tid()));
+ }
} else {
newcurr = curr;
/*
//Next fix up the modification order for actions that happened
//after the read.
post_r_modification_order(read, write);
+ //Make sure the promise's value matches the write's value
+ ASSERT(promise->get_value() == write->get_value());
promises->erase(promises->begin() + promise_index);
resolved = true;
priv->nextThread = check_current_action(priv->current_action);
priv->current_action = NULL;
+
if (curr->is_blocked() || curr->is_complete())
scheduler->remove_thread(curr);
} else {
*/
bool Node::increment_read_from() {
DBG();
-
+ promises.clear();
read_from_index++;
return (read_from_index < may_read_from.size());
}
*/
bool Node::increment_future_value() {
DBG();
-
+ promises.clear();
future_index++;
return (future_index < future_values.size());
}