struct future_value fv = curr->get_node()->get_future_value();
value = fv.value;
curr->set_read_from(NULL);
- Promise *valuepromise = new Promise(curr, value, fv.expiration);
+ Promise *valuepromise = new Promise(curr, fv);
promises->push_back(valuepromise);
}
get_thread(curr)->set_return_value(value);
const ModelAction *act = promise->get_action();
if ((old_cv == NULL || !old_cv->synchronized_since(act)) &&
merge_cv->synchronized_since(act)) {
- if (promise->increment_threads(tid)) {
+ if (promise->eliminate_thread(tid)) {
//Promise has failed
priv->failed_promise = true;
return;
continue;
if (promise->get_write() && mo_graph->checkReachable(promise->get_write(), write)) {
- if (promise->increment_threads(tid)) {
+ if (promise->eliminate_thread(tid)) {
priv->failed_promise = true;
return;
}