From c6dfb2568e6132123341ade757bf2b3119f1646e Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Fri, 1 Feb 2013 15:33:38 -0800 Subject: [PATCH] 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. --- action.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.34.1