X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=action.cc;h=44a6d9ad6948c116e3305bd955e204825f01bc96;hb=89c68eaa8c88e6ff491a7611fdf94abddd7378ae;hp=1a819eaf5584f1e97e88fca439104392c07b7f1b;hpb=075d78a2e09fd11b8b78b6c7b3852a42a279c4f2;p=model-checker.git diff --git a/action.cc b/action.cc index 1a819ea..44a6d9a 100644 --- a/action.cc +++ b/action.cc @@ -36,6 +36,9 @@ ModelAction::ModelAction(action_type_t type, memory_order order, void *loc, cv(NULL), sleep_flag(false) { + /* References to NULL atomic variables can end up here */ + ASSERT(loc || type == MODEL_FIXUP_RELSEQ); + Thread *t = thread ? thread : thread_current(); this->tid = t->get_id(); } @@ -406,16 +409,19 @@ void ModelAction::print() const break; } - printf("(%3d) Thread: %-2d Action: %-13s MO: %7s Loc: %14p Value: %-12" PRIu64, + printf("(%4d) Thread: %-2d Action: %-13s MO: %7s Loc: %14p Value: %-#18" PRIx64, seq_number, id_to_int(tid), type_str, mo_str, location, valuetoprint); if (is_read()) { if (reads_from) - printf(" Rf: %d", reads_from->get_seq_number()); + printf(" Rf: %-3d", reads_from->get_seq_number()); else - printf(" Rf: ?"); + printf(" Rf: ? "); } if (cv) { - printf("\t"); + if (is_read()) + printf(" "); + else + printf(" "); cv->print(); } else printf("\n");