From: Brian Norris Date: Fri, 1 Feb 2013 23:33:38 +0000 (-0800) Subject: action: fixup printing for RMW/RMWR X-Git-Tag: oopsla2013~300 X-Git-Url: http://demsky.eecs.uci.edu/git/?p=model-checker.git;a=commitdiff_plain;h=c6dfb2568e6132123341ade757bf2b3119f1646e action: fixup printing for RMW/RMWR Some read actions didn't really have a correct 'value' saved in the ModelAction. Now that we have the 'promise' recorded, always retrieve the value from reads_from or reads_from_promise. --- diff --git a/action.cc b/action.cc index 13da2b9..2fb498f 100644 --- a/action.cc +++ b/action.cc @@ -510,8 +510,10 @@ void ModelAction::print() const } uint64_t valuetoprint; - if (type == ATOMIC_READ && reads_from != NULL) + if (is_read() && reads_from) valuetoprint = reads_from->value; + else if (is_read() && reads_from_promise) + valuetoprint = reads_from_promise->get_value(); else valuetoprint = value;