Don't pass a bunch of parameters individually; just pass the struct.
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);
class Promise {
public:
- Promise(ModelAction *act, uint64_t value, modelclock_t expiration) :
- value(value), expiration(expiration), read(act), write(NULL)
+ Promise(ModelAction *act, struct future_value fv) :
+ value(fv.value),
+ expiration(fv.expiration),
+ read(act),
+ write(NULL)
{
increment_threads(act->get_tid());
}