X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=action.cc;h=486e89ee54aaddc8ea302c64b3a1eccef786a28c;hb=e83585ce14ab6ae325c83d815dce8eb77b0e5897;hp=16f2327e8dc73de1ef564747bb27ae8c54c639fd;hpb=55eb20c50ec656d385fb6e94c01aea55e9514917;p=model-checker.git diff --git a/action.cc b/action.cc index 16f2327..486e89e 100644 --- a/action.cc +++ b/action.cc @@ -365,7 +365,7 @@ bool ModelAction::synchronize_with(const ModelAction *act) { bool ModelAction::has_synchronized_with(const ModelAction *act) const { - return cv->has_synchronized_with(act->cv); + return cv->synchronized_since(act); } /** @@ -468,22 +468,22 @@ void ModelAction::print() const break; } - printf("(%4d) Thread: %-2d Action: %-13s MO: %7s Loc: %14p Value: %-#18" PRIx64, + model_print("(%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: %-3d", reads_from->get_seq_number()); + model_print(" Rf: %-3d", reads_from->get_seq_number()); else - printf(" Rf: ? "); + model_print(" Rf: ? "); } if (cv) { if (is_read()) - printf(" "); + model_print(" "); else - printf(" "); + model_print(" "); cv->print(); } else - printf("\n"); + model_print("\n"); } /** @brief Print nicely-formatted info about this ModelAction */ @@ -492,7 +492,7 @@ unsigned int ModelAction::hash() const unsigned int hash=(unsigned int) this->type; hash^=((unsigned int)this->order)<<3; hash^=seq_number<<5; - hash^=tid<<6; + hash ^= id_to_int(tid) << 6; if (is_read()) { if (reads_from)