model: release sequences: check last action in each thread
authorBrian Norris <banorris@uci.edu>
Thu, 20 Sep 2012 17:47:31 +0000 (10:47 -0700)
committerBrian Norris <banorris@uci.edu>
Thu, 20 Sep 2012 21:10:01 +0000 (14:10 -0700)
Previously, release_seq_head would only examine actions on a particular, given
object to determine a release sequence. However, we can get information
regarding the possibility of future disruptive writes by checking the clock
vector of the last action of each thread, regardless of object.

model.cc

index a7c99af..d2fc366 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -1118,6 +1118,10 @@ bool ModelChecker::release_seq_head(const ModelAction *rf, rel_heads_list_t *rel
                 * the release seq? */
                bool future_ordered = false;
 
+               ModelAction *last = get_last_action(int_to_id(i));
+               if (last && rf->happens_before(last))
+                       future_ordered = true;
+
                for (rit = list->rbegin(); rit != list->rend(); rit++) {
                        const ModelAction *act = *rit;
                        if (!act->is_write())