From 2e343f1ee60e801cb17ef75fb915f44a389eb6c7 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Mon, 1 Oct 2012 17:37:02 -0700 Subject: [PATCH] model: refactor/reword initialize_curr_action() --- model.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/model.cc b/model.cc index c4bc693e..9dc1d37c 100644 --- a/model.cc +++ b/model.cc @@ -543,16 +543,19 @@ ModelAction * ModelChecker::initialize_curr_action(ModelAction *curr) /* Discard duplicate ModelAction; use action from NodeStack */ delete curr; + /* Always compute new clock vector */ newcurr->create_cv(get_parent_action(newcurr->get_tid())); } else { newcurr = curr; + + /* Always compute new clock vector */ + newcurr->create_cv(get_parent_action(newcurr->get_tid())); /* * Perform one-time actions when pushing new ModelAction onto * NodeStack */ - curr->create_cv(get_parent_action(curr->get_tid())); - if (curr->is_write()) - compute_promises(curr); + if (newcurr->is_write()) + compute_promises(newcurr); } return newcurr; } -- 2.34.1