updated |= r_status;
} else if (!second_part_of_rmw) {
/* Read from future value */
- value = curr->get_node()->get_future_value();
- modelclock_t expiration = curr->get_node()->get_future_value_expiration();
+ struct future_value fv = curr->get_node()->get_future_value();
+ value = fv.value;
curr->set_read_from(NULL);
- Promise *valuepromise = new Promise(curr, value, expiration);
+ Promise *valuepromise = new Promise(curr, value, fv.expiration);
promises->push_back(valuepromise);
}
get_thread(curr)->set_return_value(value);
}
/**
- * Gets the next 'future_value' value from this Node. Only valid for a node
- * where this->action is a 'read'.
+ * Gets the next 'future_value' from this Node. Only valid for a node where
+ * this->action is a 'read'.
* @return The first element in future_values
*/
-uint64_t Node::get_future_value() const
-{
- ASSERT(future_index >= 0 && future_index < ((int)future_values.size()));
- return future_values[future_index].value;
-}
-
-modelclock_t Node::get_future_value_expiration() const
+struct future_value Node::get_future_value() const
{
ASSERT(future_index >= 0 && future_index < ((int)future_values.size()));
- return future_values[future_index].expiration;
+ return future_values[future_index];
}
int Node::get_read_from_size() const
Node * get_parent() const { return parent; }
bool add_future_value(uint64_t value, modelclock_t expiration);
- uint64_t get_future_value() const;
- modelclock_t get_future_value_expiration() const;
+ struct future_value get_future_value() const;
bool increment_future_value();
bool future_value_empty() const;