return reads_from_promise->get_value();
}
+/**
+ * @brief Get the value written by this store
+ *
+ * We differentiate this function from ModelAction::get_reads_from_value and
+ * ModelAction::get_value for the purpose of RMW's, which may have both a
+ * 'read' and a 'write' value.
+ *
+ * Note: 'this' must be a store.
+ *
+ * @return The value written by this store
+ */
+uint64_t ModelAction::get_write_value() const
+{
+ ASSERT(is_write());
+ return value;
+}
+
/** @return The Node associated with this ModelAction */
Node * ModelAction::get_node() const
{
uint64_t valuetoprint;
if (is_read())
valuetoprint = get_reads_from_value();
+ else if (is_write())
+ valuetoprint = get_write_value();
else
valuetoprint = value;
modelclock_t get_seq_number() const { return seq_number; }
uint64_t get_value() const { return value; }
uint64_t get_reads_from_value() const;
+ uint64_t get_write_value() const;
const ModelAction * get_reads_from() const { return reads_from; }
Promise * get_reads_from_promise() const { return reads_from_promise; }
write_thread = write_thread->get_parent();
struct future_value fv = {
- writer->get_value(),
+ writer->get_write_value(),
writer->get_seq_number() + params.maxfuturedelay,
write_thread->get_id(),
};