order(order),
location(loc),
value(value),
+ reads_from(NULL),
cv(NULL)
{
Thread *t = thread_current();
ASSERT(cv);
if (act->is_release() && this->is_acquire())
cv->merge(act->cv);
+ reads_from = act;
value = act->value;
}
type_str = "unknown type";
}
- printf("(%3d) Thread: %-2d Action: %-13s MO: %d Loc: %14p Value: %d",
+ printf("(%3d) Thread: %-2d Action: %-13s MO: %d Loc: %14p Value: %-4d",
seq_number, id_to_int(tid), type_str, order, location, value);
+ if (reads_from)
+ printf(" Rf: %d", reads_from->get_seq_number());
if (cv) {
printf("\t");
cv->print();
void * get_location() const { return location; }
modelclock_t get_seq_number() const { return seq_number; }
int get_value() const { return value; }
+ const ModelAction * get_reads_from() const { return reads_from; }
Node * get_node() const { return node; }
void set_node(Node *n) { node = n; }
* should probably be something longer. */
int value;
+ /** The action that this action reads from. Only valid for reads */
+ const ModelAction *reads_from;
+
/** A back reference to a Node in NodeStack, if this ModelAction is
* saved on the NodeStack. */
Node *node;