X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=action.cc;h=9427c7d204e4a8e3a509f7cda437c7c67439e58f;hb=523a941d19374d4487e504db519114df07d9b480;hp=1387ed15b67c9ac25d7fcba68491bbb72d8ff236;hpb=15fabc6f4e6591341940a8087a8dd088af59bb5c;p=model-checker.git diff --git a/action.cc b/action.cc index 1387ed1..9427c7d 100644 --- a/action.cc +++ b/action.cc @@ -156,6 +156,11 @@ bool ModelAction::is_initialization() const return type == ATOMIC_INIT; } +bool ModelAction::is_relaxed() const +{ + return order == std::memory_order_relaxed; +} + bool ModelAction::is_acquire() const { switch (order) { @@ -468,22 +473,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 */