updated |= r_status;
break;
}
+ case READ_FROM_PROMISE: {
+ const Promise *promise = curr->get_node()->get_read_from_promise();
+ value = promise->get_value();
+ curr->set_read_from_promise(promise);
+ mo_graph->startChanges();
+ updated = r_modification_order(curr, promise);
+ mo_graph->commitChanges();
+ break;
+ }
case READ_FROM_FUTURE: {
/* Read from future value */
struct future_value fv = node->get_future_value();
/* Only add feasible future-values */
mo_graph->startChanges();
r_modification_order(curr, promise);
- if (!is_infeasible()) {
- const struct future_value fv = promise->get_fv();
- curr->get_node()->add_future_value(fv);
- }
+ if (!is_infeasible())
+ curr->get_node()->add_read_from_promise(promise_read);
mo_graph->rollbackChanges();
}
}
*/
bool Node::read_from_empty() const
{
- return read_from_past_empty() && future_value_empty();
+ return read_from_past_empty() &&
+ read_from_promise_empty() &&
+ future_value_empty();
}
/**
*/
unsigned int Node::read_from_size() const
{
- return read_from_past.size() + future_values.size();
+ return read_from_past.size() +
+ read_from_promises.size() +
+ future_values.size();
}
/******************************* end read from ********************************/